Skip to content

Disable redirects on measurement fetch, and default to loopback device for attestation provider server - #95

Merged
ameba23 merged 2 commits into
mainfrom
peg/disable-redirects-on-measurement-fetch
Sep 21, 2026
Merged

ameba23 merged 2 commits into
mainfrom
peg/disable-redirects-on-measurement-fetch

Conversation

@ameba23

@ameba23 ameba23 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

This fixes two minor security issues:

  1. The attestation provider server previously defaults to using the unspecified address "0.0.0.0". This provides a footgun where it can easily be exposed externally, providing an attestation oracle. This PR changes the default to the loopback device "127.0.0.1".
  2. On fetching measurement policy from remote source, HTTP redirects can make it hard to be sure what the actual source is, and whether http was used when https was specified. This PR disallows HTTP redirects when fetching measurements from a remote source. I checked that measurements.buildernet.org does not use redirection.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

This pull request hardens measurement-policy retrieval and reduces accidental external exposure of the attestation provider.

Changes:

  • Rejects HTTP redirects when fetching measurements.
  • Adds redirect regression tests.
  • Defaults the provider server to loopback.
File summaries
File Summary
crates/attestation/src/measurements.rs Rejects redirects and tests both fetch paths.
crates/attestation-provider-server/src/main.rs Defaults server binding to 127.0.0.1.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ameba23
ameba23 requested a review from alexhulbert September 17, 2026 06:42

@alexhulbert alexhulbert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@ameba23
ameba23 merged commit c99e0b1 into main Sep 21, 2026
5 checks passed
@ameba23
ameba23 deleted the peg/disable-redirects-on-measurement-fetch branch September 21, 2026 10:24
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