test(enrichment): unit coverage for the IaC-misconfig analyzer pure scanner - #3279
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 00:33:32 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Closes #2096
What
Adds unit coverage for the pure exports of
review-enrichment/src/analyzers/iac-misconfig.tsthat the existingiac-misconfig.test.tsdoes not yet exercise. Kept in a companion file (iac-misconfig-rules.test.ts) so concurrent analyzer PRs don't collide with the existing suite.The existing tests cover the container/cloud securityContext rules, Dockerfile build instructions, and the TLS/certificate-bypass family. This fills the remaining gaps the issue calls out:
wildcard-cors-credentials(wildcard origin + credentials together),insecure-cookie(SameSite=NonewithoutSecure=true), andprod-debug(debug enabled in a production config) — each reported at themaxof the two contributing line numbers, and each not fired when only one half is present.public-bucket(public object-storage ACL, both theacl = "public-read"andpublic_access = trueshapes) andhardcoded-service-url.isRelevantConfigPath: relevant IaC/config types (Terraform, YAML/YML, Dockerfile(+suffix), docker-compose/compose, Helm values, dotenv(+env), JSON/TOML/INI/CONF, nginx.conf) vs ordinary source paths (.ts/.py/.md/.go/.css).{ file, line, kind }emitted in scan (line) order, plus a clean-config patch producing no findings.Scope
Test-only. No source, wiring, or generated-artifact changes — the analyzer and its network entrypoint (
scanIacMisconfig) are unchanged and out of scope per the issue.review-enrichmentsuite: all green (node --test).