Skip to content

Limit datasources to public networks#5391

Merged
evankanderson merged 2 commits intomindersec:mainfrom
evankanderson:bound-datasources
Feb 3, 2025
Merged

Limit datasources to public networks#5391
evankanderson merged 2 commits intomindersec:mainfrom
evankanderson:bound-datasources

Conversation

@evankanderson
Copy link
Copy Markdown
Member

@evankanderson evankanderson commented Feb 1, 2025

Summary

Only allow datasources to fetch from public services, rather than fetching content from private IP resources.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Unit testing (needed to override tests). This is also in place for http.send already (tested manually).

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@evankanderson evankanderson requested a review from a team as a code owner February 1, 2025 01:17
if transport == nil {
transport = rego.LimitedDialer(nil)
}
fmt.Printf("transport: %p, tot: %p\n", transport, h.testOnlyTransport)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover from testing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

@evankanderson evankanderson merged commit fdc94f0 into mindersec:main Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants