[quality] audit-schedule.yml is the only workflow with no contract test: nothing asserts where the check:audit gate runs
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1508 by @hivecommons-hive — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- github-actions, javascript
Research direction
Start from .github/workflows/audit-schedule.yml and ci.yml, then compare them with tests/check-links-schedule-contract.test.mjs, which the issue says to mirror. The work is already under way in linked PR #1508, so check that PR before starting. Done means a new tests/audit-schedule-contract.test.mjs passes on main and fails when the cron, the merge_group trigger, or the check:audit step is removed.
Written by the indexing model from the issue text.
Description
Finding
scripts/audit-gate.mjs is the gate that fails the build when npm audit
reports a high or critical advisory outside the documented allowlist.
tests/audit-gate.test.mjs covers that script thoroughly — the
classification, the allowlist, its parity with SECURITY.md — but it only
ever asks what the gate decides. Nothing in the suite asks where it
runs.
The two lanes that run it carry different halves of one contract, and
.github/workflows/audit-schedule.yml states the split in its own header:
ci.yml runs the gate on pull_request and merge_group, so a lockfile
change is always gated, and the scheduled workflow exists because the
advisory database moves on its own — an advisory published against the
lockfile exactly as committed changes no file here, so nothing re-runs the
gate while main is quiet.
Verified at main 1ae3403:
grep -rn 'audit-schedule' tests/returns zero hits.
audit-schedule.ymlis the only workflow in.github/workflows/with no
contract test of its own —check-links.ymlwas the previous one, and
tests/check-links-schedule-contract.test.mjsclosed that hole for the
same reason.tests/workflow-scripts.test.mjsonly asks whether some workflow runs
eachcheck:*gate, andci.ymlsatisfies that alone. Deleting
audit-schedule.ymloutright, or dropping itsschedule:block and
leaving itworkflow_dispatch-only, leaves all 2702 unit tests green
while reverting the repository to exactly the posture the workflow was
added to fix.- The symmetric edit is uncovered too: removing
merge_groupor the
check:auditstep fromci.ymlis caught by nothing.
tests/ci-gating-jobs.test.mjsreads the job's failure handling rather
than which gates it runs. - The workflow's
# Monday, offset from codeql.yml's 07:31 so the two do not contendcomment is unasserted. No test anywhere compares cron expressions
across workflows; a later workflow copying a sibling's cron wholesale
reintroduces exactly the contention the offset was chosen to avoid. A red run on this workflow is the notification; it opens nothingis
unasserted.tests/ci-supply-chain.test.mjsrefuses an unconstrained
token andwrite-all, both of which a narrowissues: writepasses.
This is not a coverage gap. npm run test:unit:coverage at 1ae3403
reports src files 100.00% lines (9771/9771) and 100.00% regions (2811/2811); the missing assertions are over workflow YAML, which the
line/region coverage model does not see at all.
Recommendation
Add tests/audit-schedule-contract.test.mjs, shaped like the existing
tests/check-links-schedule-contract.test.mjs, asserting:
-
package.jsondefines thecheck:auditscript both lanes run -
ci.ymltriggers on bothpull_requestandmerge_groupand runs
check:audit -
audit-schedule.ymldeclares aschedule.cronandworkflow_dispatch -
audit-schedule.ymlrunscheck:auditand nothing else, so its
header'snpm ciplus onenpm audit --package-lock-onlycost claim
stays true (the check must also catch the barenpm testlifecycle
spelling, whichnpm run-only parsing misses) - no two scheduled workflows share a cron expression
-
audit-schedule.ymlholds no write scope at any level
Every assertion should be mutation-checked: delete the cron, collide it with
codeql.yml's 31 7 * * 1, add npm test to the step, add issues: write,
and drop merge_group from ci.yml — each must turn exactly the
corresponding test red.
Priority
- Impact: medium — the failure mode is silent and permanent: the weekly
advisory re-check can disappear without a single contributor's PR going
red. - Effort: low — one new test file, no production change.
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 1ae3403
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 16h 38m
- Merged PRs (30d)
- 608
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
[guide] docs/metrics/index.md names retired 'Import reference architectures' workflow as the metrics refresh pathPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 70/100
cncf/endusers#1537 · 2 comments ·
Maintainers usually reply within 1 day
-
[sec-check] netlify.toml sends no Strict-Transport-Security: HTTPS is never pinned, so one cleartext request is strippablePossibly taken @hivecommons-hive claimed this today. Openagent/sec-check hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 security
Difficulty 3/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[quality] No guard against untrusted-context script injection in workflow run blocksPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
agent/architect architecture hive/hosted-available-lke648397-260827-5n31 tech-debt
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
agent/quality hive/hosted-available-lke648397-260827-5n31 needs-decision quality testing
Difficulty 3/5 1-3 hours Newbie friendliness 15/100
cncf/endusers#1535 · 9 comments ·
Maintainers usually reply within 1 day
Similar issues
-
change request evaluating
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sindresorhus/eslint-plugin-unicorn#3907 ·
Maintainers usually reply within 1 day
-
Android bug feature/error-tracking react-native team/error-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PostHog/posthog-js#5310 · 1 comment ·
Maintainers usually reply within 1 day
-
Add Prettier and a format-check CI jobPossibly taken @ezekielnathaniel070-ai claimed this today. Openbackend frontend good first issue Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OlaGreat/starbound-realms#98 · 1 comment ·
-
Add AudiobookshelfOpenapp request good first issue help wanted self-hosted app
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Secra-Solutions/Conector#15 ·
-
Complexity: See issue making label epic good first issue Issue Making: Level 1 P-Feature: Project Info and Page role: back end/devOps role: front end size: 0.25pt time sensitive
Difficulty 2/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day