Conversation
Restore repository, branch, and full commit metadata for developer builds while keeping release output deterministic. Pass reproducible mode explicitly through Make instead of ambient environment variables, and remove redundant historical documentation.
✅ Deploy Preview for specter-diy-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Schnuartz
approved these changes
Sep 4, 2026
Contributor
|
@al-munazzim can you review? |
al-munazzim
approved these changes
Sep 5, 2026
al-munazzim
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the working-tree provenance follow-up. I ran the focused embed_git_info tests directly from the test module on this PR: 7 tests passed.\n\nThe explicit Clean/Modified/unknown working-tree field addresses the misleading-commit concern without changing the embedded commit SHA, and the tests cover ignored files, untracked files, and initialized nested submodule modifications. This should make developer-build provenance more accurate while keeping reproducible builds unknown/stable. No blocker from me.
Address review feedback on cryptoadvance#419: remote.origin.url may contain credentials (https://<token>@github.com/..., https://user:pass@...) which would be frozen into firmware and shown on the About screen. - strip userinfo from https/http/ssh/git scheme URLs via regex - allow only https/http/ssh/git schemes and scp-like user@host:path syntax; reject file:// and other protocols as well as bare local paths (which leak developer machine paths/usernames) - fail closed to 'unknown' for malformed URLs (e.g. multiple @ in netloc after stripping) - drop the rev-parse --show-toplevel fallback in discover_repository() for the same reason
maggo83
force-pushed
the
report-working-tree-state
branch
from
September 7, 2026 11:37
b663942 to
a31b033
Compare
URL schemes are case-insensitive (RFC 3986), so HTTPS://... must not be rejected as unknown. Extract the scheme via regex and compare it lowercased against the allowlist. Also fail fast in the test helper load_embed_git_info() if the module spec or loader cannot be created, instead of raising AttributeError later.
maggo83
force-pushed
the
report-working-tree-state
branch
from
September 7, 2026 11:48
a31b033 to
74259cb
Compare
Token- and credential-looking literals (ghp_secret123, user:pass@...) trigger secret-scanner heuristics and tooling redaction even though they are fake. Replace them with clearly synthetic placeholders (SECRET-TOKEN, PASSWORD, CRED, user:<password>@host) that exercise the same code paths without matching credential patterns.
maggo83
force-pushed
the
report-working-tree-state
branch
from
September 7, 2026 13:26
74259cb to
3362251
Compare
The scp-like user@host:path form has no credential field, but the user part can still carry PII (emails, internal usernames) which would be frozen into firmware verbatim. Fail closed to 'unknown' unless the user is the standard 'git' login used by GitHub/GitLab and other major hosting services.
Detect clean or modified developer checkouts, including nested submodules, while keeping reproducible and no-Git builds unknown. Show the result in the device firmware details.
maggo83
force-pushed
the
report-working-tree-state
branch
from
September 7, 2026 13:51
3362251 to
4c2a3f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependency
Depends on #419 and must be reviewed/merged after it. This branch is based directly on #419 commit
f9f825367a3d697fe5dedc50cfbcf15867ad0890.Until #419 merges, GitHub will also show its changes in this PR. The intended follow-up diff is:
Summary
Add a separate working-tree state to developer build provenance without changing the embedded commit SHA.
CleanorModifiedfor developer checkoutsunknownwhen Git is unavailable and in reproducible buildsWorking tree: Clean/Modifiedin firmware detailsIgnored build products remain excluded through Git's normal ignore rules. The state is informational and does not claim that the binary is reproducible from the identified checkout.
Validation
Modified; confirmed on-deviceClean; confirmed on-device