Repository navigation
ci: audit main and develop daily, accept RUSTSEC-2024-0449, and open an issue when the scheduled audit fails - #2036
Merged
Merged
Conversation
…an issue when the scheduled audit fails Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
…ess bound at 15 days Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
…h ignore list forms Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
…porter concurrency group Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
…ther Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
…s and escapes in the ignore lists Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
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.
Closes #2034
The scheduled audit on
mainwent red on 2026-10-12 and nothing said so. I fix the cause and the silence.unsafe-libyaml0.2.11 unmaintained, viaserde_yaml_ng0.10.0, the latest release) is accepted explicitly, with the reason written down, indeny.tomland in a new.cargo/audit.toml. Both are needed: cargo-deny reads the first, cargo-audit reads the second, andrelease.ymlrunscargo audit --deny warningsfrom the root, so an entry only indeny.tomlwould have failed the next release.tests/audit_ignore_lists.rskeeps the two lists equal; its parser ignores commented-out lines and reads both forms cargo-deny accepts (table and plain string). Moving off the crate is deps: move the compose parser off unsafe-libyaml (RUSTSEC-2024-0449) #2035, which removes both entries.audit.ymlruns daily instead of weekly. The schedule auditsmainand then starts a separate run of the same workflow ondevelop(gh workflow run audit.yml --ref develop), so each branch is audited in its own context. The scheduled job waits for that run and fails if it does not succeed or never appears, so a develop run cancelled in the queue is reported too. Checking develop out from main's scheduled run would execute develop's tree where every step can write the cache all branches read; CodeQL flagged exactly that on the first version of this pull request, and skipping the cache step did not clear it, because any step there can write the cache.reportjob opens an issue when the scheduled run, for either branch, does not succeed (failure, cancelled or timed out), and when a manual dispatch fails; if the issue is already open it comments instead. The develop run started by the schedule does not report itself, and reporters run one at a time, so one failure gives one issue.issues: writeis granted to that job only; it checks out nothing, installs nothing, and reads every value fromenv.freshness-auditstays at 15 days for now. Lowering it to 3 here turned it red at once, because the last green scheduled run is 2026-10-05 and today's failed on this advisory. I lower it once the daily runs are green..cargo/audit.tomljoins the paths that run the audit on a pull request.What I ran:
cargo audit --deny warningsandcargo deny checkfrom the root: exit 0. Removing the id from either file turns its tool red on RUSTSEC-2024-0449 and failsthe_two_ignore_lists_agree_on_advisory_ids.reportscript, extracted from the workflow, against a stubgh: it comments on the open issue's number, creates one with the labels when none is open, reports acancelledrun and a failed dispatch, and exits 1 whenghfails. The dispatch-and-wait step against a stubgh: exit 0 when the run appears and passes, 1 when it fails, 1 when it never appears. Commenting out the ignore in.cargo/audit.toml, or adding a plain-string id todeny.toml, fails the agreement test.actionlint1.7.12 on the three workflows;cargo test --locked --all-features --workspace: 3423 passed, 0 failed; the lint-shell suite astest-commandruns it: 38/38;check-merge-group-triggers.pyandcheck-caller-with-defaults.py: clean.None of the audit checks is required, so this changes no required check name.
Signed-off-by: Jaro-c 75870284+Jaro-c@users.noreply.github.com