Skip to content

feat(rules): WF018/WF019/WF020 + SD014 — 4 new CI/CD detection rules (closes #336/#337/#338/#390)#403

Merged
hyperpolymath merged 1 commit into
mainfrom
cicd/rules-batch-a-2
May 30, 2026
Merged

feat(rules): WF018/WF019/WF020 + SD014 — 4 new CI/CD detection rules (closes #336/#337/#338/#390)#403
hyperpolymath merged 1 commit into
mainfrom
cicd/rules-batch-a-2

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Each new check is wired into the corresponding module's audit/scan dispatcher and accompanied by sensitivity/specificity comment block documenting fire conditions.

Test plan

  • mix test (when phoenix dep compile is unblocked locally — the in-tree mix compile currently fails on Phoenix.Naming due to an Elixir 1.14 vs Phoenix version issue, unrelated to this change)
  • Once merged: run hypatia scan against the cited prior-art repos and confirm each new rule fires once
  • Test scaffolds for the 4 new rules will land in a follow-up PR keyed to issue rules: add 7 CI/CD weak-point detectors learned from 2026-05-26 affinescript session #333 cohort completion

Closes

🤖 Generated with Claude Code

…loses #336/#337/#338/#390)

Adds four new rules surfaced by the 2026-05-30 estate sweep:

- WF018 (workflow_audit.ex): scorecard.yml wrappers that delegate to
  standards' `scorecard-reusable.yml` but lack `security-events: write`.
  Estate baseline: 81 of 88 wrappers affected — every Scorecard run
  silently fails with `startup_failure`. Closes #390.
- WF019 (workflow_audit.ex): in-tree `workflow-linter.yml` that greps
  for `uses:` across all workflow files without exempting itself or
  the sibling `scorecard-enforcer.yml` — the linter flags itself.
  Observed in ipv6-only#9/#10, file-soup#44, fireflag#30. Closes #337.
- WF020 (workflow_audit.ex): companion to existing
  `check_codeql_language_matrix_mismatch`. Catches the positive case:
  codeql.yml that does not list `language: actions` in its matrix on
  a repo with workflow files. Closes #338.
- SD014 (structural_drift.ex): `examples/SafeDOMExample.res` lingering
  without the canonical `.affine` replacement (ReScript banned in new
  code 2026-04-30). Two states: fail when `.res` only, warn when both
  dialects present. Closes #336.

Each new check is wired into the corresponding module's audit/scan
dispatcher and accompanied by sensitivity/specificity comment block
documenting fire conditions. No new tests in this PR — test scaffolds
will follow in a separate PR keyed to issue #333 cohort completion.

Closes #336
Closes #337
Closes #338
Closes #390

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath enabled auto-merge (squash) May 30, 2026 22:29
@hyperpolymath hyperpolymath merged commit 49f57a0 into main May 30, 2026
1 of 31 checks passed
@hyperpolymath hyperpolymath deleted the cicd/rules-batch-a-2 branch May 30, 2026 22:39
hyperpolymath pushed a commit that referenced this pull request May 30, 2026
#403 WF018)

PR #404 added scorecard_wrapper_missing_job_permissions to cicd_rules.ex,
but PR #403 had concurrently implemented the same #390 detection as WF018
(check_scorecard_wrapper_missing_job_permissions) in workflow_audit.ex — its
canonical home alongside WF019/WF020. This removes the redundant cicd_rules
copy (rule, facade delegate, test, changelog entries); WF018 stays as the
single implementation.

Verified locally (Elixir 1.14): cicd_rules.ex compiles with zero warnings;
format-isolation confirms a pure deletion with no pre-existing reformat.

https://claude.ai/code/session_01J8oLNn6MjKDRRUF65e2jLf
hyperpolymath added a commit that referenced this pull request May 30, 2026
…F018) (#407)

PR #404 added scorecard_wrapper_missing_job_permissions to cicd_rules.ex, but #403 had concurrently implemented the same #390 detection as WF018 in workflow_audit.ex. Removes the redundant cicd_rules copy (rule, facade delegate, test, changelog); WF018 remains the single implementation. The #362 cron rule and #405 nodejs carve-outs are untouched.

Verified locally (Elixir 1.14): zero-warning compile; format-isolation shows a pure deletion.

https://claude.ai/code/session_01J8oLNn6MjKDRRUF65e2jLf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant