Skip to content

feat: WIP-106 tokens generation & circuits - #852

Merged
kilianglas merged 11 commits into
mainfrom
wip-106-poc
Aug 6, 2026
Merged

feat: WIP-106 tokens generation & circuits#852
kilianglas merged 11 commits into
mainfrom
wip-106-poc

Conversation

@paolodamico

@paolodamico paolodamico commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
New cryptographic token formats and in-circuit signature/CBOR verification are security-sensitive, though largely additive/WIP with extensive KAT coverage and no change to embedded ownership-proof artifacts yet.

Overview
Adds WIP-106 authenticator attestation end-to-end: Rust helpers to mint Trust Anchor Key Tokens (BabyJubJub EdDSA over a Poseidon2 claim digest) and Authenticator Assertion Tokens (ES256 over COSE Sig_structure, with the TAKT embedded under submods.takt), plus a new Noir authenticator-assertion library that checks the same chain in-circuit (verify_takt, verify_aat).

The Noir side rebuilds deterministic CBOR at fixed offsets (TAKT reserialization, AAT Sig_structure), enforces expiry and claim encoding constraints, and uses pure Noir P-256 ECDSA (not stdlib black boxes) with an explicit r != 0 guard. Known-answer tests in Rust and Noir pin digests, serialization, and signatures.

CI splits Noir into separate jobs for ownership-proof and authenticator-assertion. Workspace deps add coset and p256 on world-id-proof; the module is exported as authenticator_attestation (marked WIP in docs).

Reviewed by Cursor Bugbot for commit e3ceb19. Bugbot is set up for automated code reviews on this repo. Configure here.

run:
working-directory: ./crates/proof/noir/authenticator-attestation
steps:
- uses: actions/checkout@v6

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.

Semgrep identified an issue in your code:

The actions/checkout@v6 step uses a mutable version tag that can be silently repointed by attackers, enabling supply-chain attacks where malicious code runs in your CI/CD pipeline.

More details about this

The uses: actions/checkout@v6 step uses a mutable version tag instead of a pinned commit SHA. The v6 tag is a floating reference that the action maintainers can update at any time without warning. If an attacker compromises the actions/checkout repository or GitHub's infrastructure, they could repoint the v6 tag to a malicious version that runs arbitrary code in your workflow.

Here's a realistic attack scenario:

  1. Attacker gains access to the actions/checkout repository on GitHub (e.g., through a compromised maintainer account).
  2. Attacker updates the v6 tag to point to a new commit containing malicious code that exfiltrates secrets or modifies your build output.
  3. Your workflow runs and pulls the tag @v6 without knowing it now resolves to the attacker's malicious commit.
  4. The attacker's code executes with full access to your repository secrets, environment variables, and ability to push commits.

Notice that the noir-lang/noirup action in the same file is already pinned to a full commit SHA (7dbe69ccc78877f0200ffa5a40836c953d2cfd8f), so actions/checkout should follow the same pattern.

To resolve this comment:

✨ Commit fix suggestion
  1. Replace each mutable GitHub Action tag with a full 40-character commit SHA in the uses: field.
  2. Update actions/checkout@v6 to a pinned commit SHA for the actions/checkout release you want to keep. For example, change it to uses: actions/checkout@<40-character-commit-sha> # v6.
  3. Apply the same change to every occurrence in this workflow, including both ownership-proof and authenticator-attestation, so no actions/checkout@v6 reference remains.
  4. Keep the version comment after the SHA, such as # v6, so it is clear which release the pinned commit corresponds to. Pinning to a commit SHA prevents the action owner from silently moving the referenced version tag to different code.
💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.

You can view more details about this finding in the Semgrep AppSec Platform.

@kilianglas
kilianglas marked this pull request as ready for review August 4, 2026 21:01
@kilianglas
kilianglas requested a review from a team as a code owner August 4, 2026 21:01
kilianglas
kilianglas previously approved these changes Aug 4, 2026

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cf5aaad. Configure here.

Comment thread crates/proof/src/authenticator_attestation/mod.rs
@kilianglas
kilianglas merged commit cfabe98 into main Aug 6, 2026
25 checks passed
@kilianglas
kilianglas deleted the wip-106-poc branch August 6, 2026 08:08
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.

2 participants