Skip to content

Rule registry: add the plain type names findings carry (A5, second pass) - #1082

Merged
hyperpolymath merged 7 commits into
mainfrom
marina/jolly-pasteur-w0jalq
Nov 13, 2026
Merged

hyperpolymath merged 7 commits into
mainfrom
marina/jolly-pasteur-w0jalq

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

What

Follow-up to #1070. The A5 registry had the coded ids (WF013, SD001, PA001) but not the plain type names that most findings carry, for example code_safety/js_exec_sync and workflow_audit/missing_workflow. SARIF ruleIds, .hypatia-baseline.json and .hypatia-ignore key on those names. A deviation against them did not resolve.

This PR adds them. It is additive: 236 to 433 rules (main's current count), 197 added, none changed, none removed. No rule code changes and no emitted id changes.

workflow_audit is the reason the coded ids were not enough. cli.ex emits Map.get(f, :type) || Map.get(f, :rule), so a finding that carries both (for example WF013 and npermissions_typo) is emitted under the type. Both names are now registered. A finding that declares a rule_id of the form hypatia/<module>/<name> is emitted under that module (WF029 is ci_failure_triage/always_after_cancel), so the generator does not register that name under the source module.

Where each name comes from

The generator reads the code that lib/hypatia/cli.ex turns into type:

Module Source Rows
code_safety id: :name entries with a pattern: in code_safety.ex 95
content_patterns @blocked_patterns entries with applies_to: in cicd_rules.ex 11
workflow_audit type: :name atoms and rule: "name" strings 44
honest_completion type: :name atoms 9
green_web type: :name atoms 8
root_hygiene type: :name atoms 3
scorecard the category: of each of the 20 checks 20
workflow_hardening the lowercase rule: "invalid_actions_lock" 1
fixed names cicd_rules/missing_requirement, cicd_rules/banned_language_file, migration_rules/deprecated_api, security_errors/secret_detected, structured_format/SF001, implementation_inside_canon/HYP-S009 (plus no_workflows_dir and inflated_completion, counted above)

Each fixed name is proved by a literal in the code that emits it, and so is the severity the code states for it (beside the literal, or in the named file). The generator refuses to run if a proof goes away. A name that already has a row is skipped.

audit_prevention needs no new rows: its finding sets rule: record.id (AP001 to AP015), and cli.ex emits that, not the lowercase record.rule.

Tests

tests/rules-praxis-test.sh: 23 passed, 0 failed, under both gawk and mawk. The checks that matter here:

  • Every real baseline pair resolves. Ground truth: every rule_module/type pair in this repo's .hypatia-baseline.json plus the 17 pairs A5 counts in the standards baseline. A planted control shows a missing pair is caught.
  • Every literal rule_module/type pair in cli.ex and the rule files is in the registry, with a control that names the missing pair.
  • Portability. The generator runs under every awk found, with SIGPIPE ignored as on the CI runner, and must print nothing and give the committed bytes. Two CI failures on this PR came from differences between my sandbox and the runner (a \[ in an awk -v value, and head -1 pipes); this test now catches both on a dev machine.
  • Stale baseline names. Nine names resolve to nothing, because no code under lib/ mentions them: inbox_automation/IA001 to IA007 and workflow_audit/inbox_steward_intake_missing and inbox_steward_missing. The test lists them as stale and checks that claim against lib/. For the owner: those baseline entries suppress nothing in this tree and could be removed, or the rules that emitted them are on another branch.
  • deed_lint.js (standards bfdb066) accepts the deed. scripts/check-readme-claims.sh passes.

Defaulted fields, for owner review

Every defaulted row carries a ;; defaulted: comment. Of the 197 new rows:

  • :excusable-at repo and :scope-form exact-paths: all 197 (A5 G3 and 4.1 defaults).
  • :class gate: 193. :class advisory: 4, because the code says so (structured_format/SF001, known_broken_reusable_revision, reusable_call_to_moved_repository, sha_pinned_toolchain_without_input).
  • :text is a placeholder ("<id> in lib/rules/<module>.ex.") on 62 rows, because the code gives no one-line text: workflow_audit 42, green_web 8, honest_completion 8, root_hygiene 3, workflow_hardening 1. The other 135 texts come from a description: or reason: in the code.
  • :severity is omitted on 24 rows where the code states none: the 20 scorecard rows (the level comes from the scan), root_hygiene 3 and workflow_audit 1. Content patterns state none, so they take the medium default that cli.ex states.

Two judgement points for the owner:

  • green_web confirmations. green_hosting_confirmed, green_badge_present, green_registry_confirmed and domain_green_check_needed are severity info and read like confirmations, not violations. I left them :class gate, because the code does not say "advisory". The owner may want them advisory.
  • root_hygiene. The names are generic (banned, missing, stale) because that is what the code emits.

What this does not cover

  • I could not run Elixir here, so I did not compare against a real scan. CI and review are the check. The extraction reads source text with patterns, so a name defined in an unusual shape could be missed. The baseline-pair and cli.ex pair tests are where a gap would show.
  • Names that are emitted only from data at run time (for example a scorecard check the repo does not list) are not knowable from the code.

Next

Whichever PR merges next and adds a type to one of these files must run scripts/gen-rules-praxis.sh and commit the deed, or the "Rule registry" step fails as stale. I told the Extended Hypatia session before opening this. This PR already had to be regenerated once after main gained WF031 and github_state_unreadable.

🤖 Generated with Claude Code

https://claude.ai/code/session_0136P7ZmHbN98VWzhw9EshkN

The A5 registry had the coded ids (WF013, SD001, ...) but not the plain
`type` names that most findings emit: `code_safety/js_exec_sync`,
`content_patterns/http_in_docs`, `workflow_audit/missing_workflow`. SARIF
ruleIds, .hypatia-baseline.json and .hypatia-ignore key on those, so a
deviation against them did not resolve.

The generator now also reads, from the code that cli.ex normalises:
- code_safety: `id: :name` entries with a `pattern:` (95)
- content_patterns: entries of @blocked_patterns with `applies_to:` (11)
- honest_completion, green_web, root_hygiene, workflow_audit: `type: :name`
  atoms (workflow_audit also `rule: "name"` strings)
- scorecard: the 20 check categories
- seven fixed names, each guarded by the literal in the code that emits it
  (missing_requirement, banned_language_file, no_workflows_dir,
  inflated_completion, deprecated_api, secret_detected, SF001)

A name that already has a row is skipped, so nothing existing changes:
234 to 429 rules, 195 added, none changed or removed.

Tests: every rule_module/type pair of this repo's .hypatia-baseline.json and
the 17 pairs A5 counts in the standards baseline resolve, with a negative
control. Nine baseline names (inbox_automation IA001-IA007,
workflow_audit inbox_steward_*) are in no code under lib/; the test lists
them as stale and checks that claim against lib/.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZmHbN98VWzhw9EshkN
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: cc861a53-3592-44b2-abc9-2912b3d91ea4
Commits

Reviewing files that changed from the base of the PR and between 5bbb422 and c5cf03b.

Files selected for processing: 3

  • hypatia_rules_praxis.deed
  • scripts/gen-rules-praxis.sh
  • tests/rules-praxis-test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 13, 2026 19:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T20:38:24.262007Z c5cf03b New commits
🔒 Security Review ❌ Failed 2026-11-13T20:19:05.432759Z
We couldn’t complete this review. Comment @codex security review to try again.
946db09 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

CI failed "Rule registry ... is stale" on #1082 although the deed matched
locally. The CI runner's awk is gawk, this sandbox's is mawk. The script
passed the block-start pattern '^  @blocked_patterns \[' through `-v`:
mawk keeps the backslash, gawk turns `\[` into `[`, an invalid regex, and
the awk dies inside a process substitution with no error in the script.
All 11 content_patterns rows vanished from CI's generation, so the check
saw a stale deed.

- The pattern is now '^  @blocked_patterns [[]' (no backslash). Run under
  gawk 5.2.1 and mawk 1.3.4, the output is byte-identical to the committed
  deed, with no stderr.
- tests/rules-praxis-test.sh now runs the generator under every awk it
  finds (gawk, mawk, original-awk) and requires the committed bytes and an
  empty stderr. With the bug put back, it fails under gawk and passes under
  mawk, which is the CI situation.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZmHbN98VWzhw9EshkN

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98f3c76c70

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/gen-rules-praxis.sh Outdated
{ echo "gen-rules-praxis: cli.ex no longer defaults content_patterns severity to medium; update the generator" >&2; exit 1; }
while IFS=$'\037' read -r name sev txt; do
emit_name content_patterns "$name" "${sev:-medium}" "$txt"
done < <(entries lib/rules/cicd_rules.ex 'applies_to:' '^ @blocked_patterns \[')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Escape the block-start regex across awk -v

In the repository's GNU awk environment, bash tests/rules-praxis-test.sh fails here with escape sequence '\[' treated as plain '[' followed by fatal: invalid regexp ... /^ @blocked_patterns [/, because -v consumes the backslash before bstart is used as a regex. The extractor therefore emits none of the 11 content-pattern rows; --check reports the committed deed as stale, while normal generation can silently succeed with those rows removed because the process-substitution failure is not propagated. Pass a pattern whose literal bracket survives -v, or avoid a dynamic regex for this marker.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, and already fixed in 7ccdfb5, which this review predates (it reviewed 98f3c76). The pattern now passes no backslash through -v ([[]). The test also runs the generator under every awk it finds (gawk and mawk) and requires the committed bytes and an empty error output. A second fix, 5208b60, removed three head -1 pipes that printed Broken pipe when the runner ignores SIGPIPE.


Generated by Claude Code

Comment thread hypatia_rules_praxis.deed Outdated
:status active)
;; defaulted: text class excusable-at scope-form
(rule-def
:id "hypatia/workflow_audit/always_after_cancel"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor rule_id module overrides when registering types

When WF029 emits always_after_cancel, lib/rules/workflow_audit.ex:4551-4552 supplies rule_id: "hypatia/ci_failure_triage/always_after_cancel", and the normalizer in lib/hypatia/cli.ex:571-574 explicitly replaces both the module and type from that value. Consequently this newly registered workflow_audit/always_after_cancel ID is never emitted (the correct ci_failure_triage row already exists), so the registry now canonizes a nonexistent rule; the type-name extraction should account for A5 rule_id overrides rather than always assigning the source module.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in the next commit. WF029 declares rule_id: "hypatia/ci_failure_triage/always_after_cancel", and cli.ex moves both module and type to that value, so workflow_audit/always_after_cancel is never emitted. The generator now skips a name that a rule_id override moves to another module, and the row is dropped. The ci_failure_triage row is the real one. The row came from this unmerged PR, so no merged id is deleted. A test checks that the name is registered under ci_failure_triage only.


Generated by Claude Code

Comment thread scripts/gen-rules-praxis.sh Outdated
# Fixed names, each proved by a literal in the code that emits it.
while IFS=$'\t' read -r mod name f lit text; do
grep -qF -- "$lit" "$f" || { echo "gen-rules-praxis: $f no longer has '$lit' ($mod/$name)" >&2; exit 1; }
emit_name "$mod" "$name" "" "$text"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate metadata for fixed-name rows

Every entry in the fixed-name table is emitted with an empty severity and without an advisory argument, even when the guarded emitting code states those fields. As a result, missing_requirement, no_workflows_dir, and inflated_completion lose their hard-coded high severity, banned_language_file loses its current critical severity, and structured_format/SF001 is registered as a severity-less gate despite its finding declaring severity: "medium", advisory: true in lib/rules/structured_format.ex:33-34. Pass or extract the fixed rows' metadata so the registry does not change their stated gate semantics.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in the next commit. The fixed names now carry the metadata the code states: missing_requirement, no_workflows_dir and inflated_completion are high; banned_language_file is critical (all three banned extensions are); deprecated_api is high; secret_detected is critical; SF001 is medium and :class advisory, as its finding declares. Each value is proved by the code: beside the emitting literal, or in the named file. The generator refuses to run if a proof goes away. A test checks SF001 and banned_language_file.


Generated by Claude Code

Comment thread scripts/gen-rules-praxis.sh Outdated
emit_name content_patterns "$name" "${sev:-medium}" "$txt"
done < <(entries lib/rules/cicd_rules.ex 'applies_to:' '^ @blocked_patterns \[')

for m in honest_completion green_web root_hygiene workflow_audit; do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Register plain names from every emitting module

This module list is not exhaustive for CLI-emitted types: run_opt_in(:audit_prevention) normalizes f.rule and can emit 15 lowercase names such as audit_prevention/parser_input_limits (lib/hypatia/cli.ex:1254-1261), workflow hardening can emit workflow_hardening/invalid_actions_lock (lib/hypatia/cli.ex:802-807), and the implementation-inside-canon evaluator emits the hard-coded type implementation_inside_canon/HYP-S009. None of those IDs exists in the generated deed, so SARIF, baselines, and deviations for those actual scan findings still cannot resolve despite this pass; extraction and its coverage test need to include every normalizer rather than only these four modules.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two of the three are real and fixed in the next commit: workflow_hardening/invalid_actions_lock and implementation_inside_canon/HYP-S009 are now registered. The third is not a gap. For audit_prevention the finding sets rule: record.id (AP001 to AP015) and type: record.rule (parser_input_limits and the other lowercase names), and cli.ex:1254-1261 emits type: f.rule, which is record.id. So the emitted names are the AP codes, which the registry already had, and the lowercase names are never emitted. I also added a test that every literal rule_module/type pair in cli.ex and the rule files is in the registry, with a control that names a missing pair.


Generated by Claude Code

The awk-portability test added in 7ccdfb5 failed in CI under both gawk and
mawk, printing "sed: couldn't flush stdout: Broken pipe". The registry
bytes were right; the stderr was not empty.

Cause: three `| head -1` pipes. head exits after one line, and a writer
upstream then hits a closed pipe. With SIGPIPE at its default the writer
dies silently (my machine). A step on the CI runner starts with SIGPIPE
ignored, so the writer prints "Broken pipe" instead. Run that way here the
generator printed 110 such messages.

- The three `head -1` become `sed -n 1p`, which reads all its input. With
  SIGPIPE ignored the generator prints nothing, and its output is unchanged.
- The portability test now runs the generator with SIGPIPE ignored, so the
  failure shows on a dev machine. With one `head -1` put back, it fails
  under both awks with the same message as CI; with the fix it passes.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZmHbN98VWzhw9EshkN
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

…errides

Review findings on #1082, checked against the code:

- The fixed names were registered with no severity and as gates. The code
  states: missing_requirement, no_workflows_dir, inflated_completion high;
  banned_language_file critical (all three banned extensions); deprecated_api
  high; secret_detected critical; SF001 medium and advisory. Each is now read
  from a table whose severity is proved by the code (beside the emitting
  literal, or in the named file); the generator refuses to run if a proof
  goes away.
- Two emitted names were missing: workflow_hardening/invalid_actions_lock
  and implementation_inside_canon/HYP-S009.
- workflow_audit/always_after_cancel is never emitted: WF029 declares
  rule_id hypatia/ci_failure_triage/always_after_cancel and cli.ex moves it
  there. A name moved off a module by a rule_id override is no longer
  registered under the source module. The row is dropped (this PR is
  unmerged, so no merged id is deleted).
- Not changed, on the evidence: audit_prevention emits f.rule, which is
  record.id (AP001..AP015), not the lowercase record.rule. Those rows were
  already right.

430 rules (one net row added, six rows gain a severity, one becomes advisory).
New tests: every literal rule_module/type pair in cli.ex and the rule files is
in the registry (with a control that names the missing pair); the override
name is under its real module only; the fixed rows carry the stated metadata.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZmHbN98VWzhw9EshkN
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 13, 2026 20:17
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

…ASE-043

main gained WF031 (#1076) and ci_failure_triage/github_state_unreadable
(#1077). Their own regenerations merged into this branch's deed cleanly,
but WF031's plain type name (workflow_audit/gitleaks_full_history_on_pr)
is a row this PR adds, so the deed was stale and the "Rule registry" check
would fail. Regenerated with scripts/gen-rules-praxis.sh: 433 rules, one row
added, none changed or removed, no duplicate id. The tests pass under gawk
and mawk.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZmHbN98VWzhw9EshkN
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@hyperpolymath
hyperpolymath merged commit bcfe50b into main Nov 13, 2026
40 checks passed
@hyperpolymath
hyperpolymath deleted the marina/jolly-pasteur-w0jalq branch November 13, 2026 20:26
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5cf03bd70

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


# Scorecard: one type per check category.
for name in $({ grep -ohE 'category: "[A-Za-z]+"' lib/scorecard_ingestor.ex | sed 's/.*: "//; s/"$//'; } | sort -u); do
emit_name scorecard "$name" "" "OpenSSF Scorecard check category $name."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate Scorecard severities into generated rows

Pass each check's declared risk instead of an empty severity here. make_pattern/4 turns the @scorecard_checks risk into the runtime finding severity, so local findings such as scorecard/TokenPermissions are high and scorecard/DependencyPinning is medium, but every newly generated Scorecard rule-def omits :severity; registry consumers therefore lose the severity that the emitted finding actually carries.

Useful? React with 👍 / 👎.

Comment on lines +350 to +351
for m in honest_completion green_web root_hygiene; do
emit_found "$m" "$(atoms lib/rules/$m.ex)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve aggregate root-hygiene severities

Handle root_hygiene separately rather than relying on near() at the type: site. These findings copy severity through rule.severity or req.severity, while the literals live in @banned_root_files, @stale_patterns, and the required-file table, so the generated banned, stale, and missing rows all omit :severity; for example, a missing license and several banned-root findings are critical, and this generator otherwise records the highest declared severity for multi-severity rule IDs.

Useful? React with 👍 / 👎.

for m in honest_completion green_web root_hygiene; do
emit_found "$m" "$(atoms lib/rules/$m.ex)"
done
emit_found workflow_audit "$(atoms lib/rules/workflow_audit.ex)" "$(strs lib/rules/workflow_audit.ex)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the missing-workflow severity

Teach this extraction path about severity_for_workflow/1 rather than leaving workflow_audit/missing_workflow severity-less. The finding stores severity: severity_for_workflow(wf), whose static cases range up to critical for a missing hypatia-scan.yml, but near() only recognizes one-line severity helpers and therefore emits no :severity for this newly registered type; this loses the highest declared severity that the generator deliberately preserves for other multi-severity rules.

Useful? React with 👍 / 👎.

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.

3 participants