-
Notifications
You must be signed in to change notification settings - Fork 0
mutation-probe: the skill's probe harness as a tested, flake-shipped Rust bin #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5412d46
mutation-probe: the probe harness as a tested flake-shipped bin
thedavidmeister b2e8725
probe self-mutation: kill the surviving exit-code-lies mutant
thedavidmeister 7ded129
static: conform to the rainix pre-commit bundle
thedavidmeister d195fd8
review round: atomic writes, capped capture, group kill, method-only …
thedavidmeister 2f20168
Merge main into the mutation-probe bin branch
thedavidmeister ef06455
Stop tracking the generated .pre-commit-config.yaml
thedavidmeister 525aafd
Keep --only a substring filter, and pin that with a test
thedavidmeister cd144d4
Merge main; fold #16's probe-before-writing rule into the condensed s…
thedavidmeister File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: rust | ||
| on: [push, pull_request] | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| test: | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-rs-test.yaml@main | ||
| secrets: inherit | ||
| static: | ||
| uses: rainlanguage/rainix/.github/workflows/rainix-rs-static.yaml@main | ||
| secrets: inherit | ||
| # The rainix reusables above build via cargo. Consumers run the flake PACKAGE | ||
| # (`nix run …#mutation-probe`), which cargo CI does not exercise — a | ||
| # workspace/lockfile drift can leave cargo green while the package fails to | ||
| # build. This job guards the path consumers actually take. | ||
| nix-build: | ||
| name: nix-build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: DeterminateSystems/nix-installer-action@a7ad9c4f0c65208097f4d34f3cfa1913b80cce5c # main | ||
| - run: nix build .#mutation-probe --print-build-logs | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /target | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Workspace root so the rainix rust reusables (cargo test / rainix-rs-static at | ||
| # the repo root) pick up the crate under mutation-probe-rs/. | ||
| [workspace] | ||
| resolver = "2" | ||
| members = ["mutation-probe-rs"] | ||
|
|
||
| [profile.release] | ||
| opt-level = 2 |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: rainlanguage/adversarial-mutation-test
Length of output: 384
🏁 Script executed:
Repository: rainlanguage/adversarial-mutation-test
Length of output: 4992
🌐 Web query:
GitHub Actions reusable workflows secrets inherit workflow_call secret declaration explicit secrets behavior💡 Result:
In GitHub Actions, reusable workflows do not automatically receive access to secrets from the caller workflow [1][2]. To provide secrets to a reusable workflow, you must explicitly pass them or use the
inheritkeyword [3][4]. Explicit Secret Passing To pass secrets explicitly, you must define the expected secrets in the reusable workflow'son.workflow_call.secretsconfiguration [5][1]. In the caller workflow, you then map the secrets using thesecretskeyword within the job call [5][6]. Example of explicit declaration in the reusable workflow: on: workflow_call: secrets: MY_SECRET: required: true Example of explicit mapping in the caller workflow: jobs: call-workflow: uses: octo-org/example-repo/.github/workflows/reusable.yml@main secrets: MY_SECRET: ${{ secrets.MY_SECRET }} Using 'secrets: inherit' Thesecrets: inheritkeyword allows a calling workflow to pass all of its available secrets to the directly called reusable workflow [3][4]. This approach is simpler but has broader security implications, as it grants the reusable workflow access to all secrets available to the caller [7][6]. Key Behavioral Notes: 1. No Automatic Recursive Forwarding: Inheritance and explicit passing are only one-hop processes [8]. If workflow A calls workflow B, and B calls workflow C, workflow C will only receive secrets from workflow B if B explicitly passes or inherits them [8][7]. 2. Declaration Requirements: When usingsecrets: inherit, you are not required to explicitly define the secrets in the reusable workflow'son.workflow_callblock to reference them [3][8]. However, when passing secrets explicitly, you must declare them [1]. 3. Environment Secrets: Theon.workflow_calltrigger does not support theenvironmentkeyword [3]. If a reusable workflow includes anenvironmentat the job level, environment secrets will take precedence, and secrets passed from the caller may not be used in the same way [3][9]. 4. Security Best Practices: Becausesecrets: inheritexposes all secrets to the called workflow, it is generally recommended to use explicit mapping to follow the principle of least privilege, unless you are using a trusted, internally governed platform workflow [7][6].Citations:
Pin reusable workflows and restrict secret delegation.
Both reusable workflows use the mutable
mainbranch. Pin each reference to an immutable commit SHA.Both workflows use
secrets.CACHIX_AUTH_TOKEN. Declare this secret underworkflow_callin each called workflow, then map only that secret in the caller instead of usingsecrets: inherit.🧰 Tools
🪛 zizmor (1.29.0)
[error] 7-7: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[warning] 7-7: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow
(secrets-inherit)
📍 Affects 1 file
.github/workflows/rust.yml#L7-L8(this comment).github/workflows/rust.yml#L10-L11🤖 Prompt for AI Agents
Source: Linters/SAST tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declining both halves — they are rainix's calls, and the second one would break CI.
SHA-pinning the reusables.
uses: …@mainis the org convention for consumers, and the pinning happens one level in:rainix-rs-test.yamlandrainix-rs-static.yamleach carryenv: RAINIX_SHA: 53e96a7d0a97d7c7c75c3b2412521324776fdac6and run the toolchain asnix develop github:rainlanguage/rainix/${{ env.RAINIX_SHA }}#rust-shell -c …. So what actually executes is already pinned to an immutable commit;@mainis the channel through which rainix rolls that pin out to every consumer at once.rain.orderbookandrain.math.floatcall the same two workflows at@main. Pinning here alone would freeze this repo on one rainix commit and silently drift from the rest of the org — a change worth making org-wide in rainix, not unilaterally in this PR.secrets: inherit→ explicit mapping. This one is not just convention, it would fail the workflow. Both reusables declare:with no
secrets:block at all, while referencingsecrets.CACHIX_AUTH_TOKENinternally (in thenix-cachix-setupcomposite call). GitHub rejects a caller that passes a secret the callee has not declared underon.workflow_call.secrets, sosecrets: { CACHIX_AUTH_TOKEN: … }here is an invalid-workflow error until rainix declares it. The suggested fix therefore starts in rainix, and shared CI is rainix's to own — this repo is a consumer. Happy to raise it there if you want the least-privilege mapping org-wide; it is a lockstep change across every consumer, not a one-file edit.The
nix-buildjob below, which this PR does own, is pinned by SHA (actions/checkout@34e1148…,nix-installer-action@a7ad9c4…).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 5827
@thedavidmeister, verified.The reusable workflows set
RAINIX_SHAto53e96a7d0a97d7c7c75c3b2412521324776fdac6for the Nix Rust toolchain. The consumer references@mainintentionally so rainix can update shared CI behavior across consumers.The reusable workflows do not declare
workflow_call.secrets. An explicitCACHIX_AUTH_TOKENmapping from this caller would therefore be invalid until rainix changes its reusable-workflow interface.This repository cannot make the proposed changes safely in isolation. I withdraw this finding.
🐇
✏️ Learnings added
✅ Review thread resolved.
You are interacting with an AI system.