Skip to content

feat(assail): exclude vendored-snapshot dirs (.yarn, idaptik-rescript13-staging, rescript-ecosystem) from analysis#72

Closed
hyperpolymath wants to merge 0 commit into
mainfrom
rule/vendored-snapshot-path-exclusion
Closed

feat(assail): exclude vendored-snapshot dirs (.yarn, idaptik-rescript13-staging, rescript-ecosystem) from analysis#72
hyperpolymath wants to merge 0 commit into
mainfrom
rule/vendored-snapshot-path-exclusion

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Adds 3 directory names to the skip lists in `walk_directory` and `count_languages_recursive`:

  • `.yarn` — Yarn 4 cached release blobs (e.g. `yarn-4.12.0.cjs`)
  • `idaptik-rescript13-staging` — ReScript 13 staging tree embedded in several estate repos
  • `rescript-ecosystem` — vendored upstream ReScript packages

These are vendored upstream snapshots; flagging findings against them produces noise the project cannot fix.

Motivation

`developer-ecosystem#83` logged 166 findings, ~70% of which fall in these paths.

Changes

  • `src/assail/analyzer.rs` (`walk_directory`): append the 3 directory names to the inline skip list.
  • `src/assail/analyzer.rs` (`count_languages_recursive`): append the 2 snapshot names (`.yarn` is already covered by the existing dot-prefix skip).
  • 3 regression tests verify each subtree is skipped while first-party sibling files are still walked.

Test plan

  • `cargo test --lib walk_skips` — all 3 new tests pass locally
  • CI green
  • Re-scan developer-ecosystem to confirm finding drop

🤖 Generated with Claude Code

@hyperpolymath hyperpolymath enabled auto-merge (squash) May 27, 2026 13:51
auto-merge was automatically disabled May 27, 2026 14:39

Pull request was closed

@hyperpolymath hyperpolymath force-pushed the rule/vendored-snapshot-path-exclusion branch from b67e861 to 03fdd9f Compare May 27, 2026 14:39
hyperpolymath added a commit that referenced this pull request May 27, 2026
…72 after force-push race) (#77)

Refile of #72 after a botched rebase pushed the wrong HEAD and
auto-closed the original PR. Same intent: exclude .yarn,
idaptik-rescript13-staging, rescript-ecosystem from analysis. Resolved
conflict in src/assail/analyzer.rs by merge-both (kept #71's Julia
*Ext.jl tests + this PR's vendored-snapshot tests).

Closes #72 (refiled).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
Copy link
Copy Markdown
Owner Author

Note: auto-closed by a botched force-push during rebase (the rebase --continue's --no-edit flag is invalid, so the push went out with the wrong HEAD which equalled main, auto-closing this PR as no-change). The intended content was refiled as #77 and merged. No action needed here.

hyperpolymath added a commit that referenced this pull request May 27, 2026
…ansitive (#75) (#78)

## Summary

Two layered refinements on top of #76 (phantom-declared /
phantom-transitive split). Same three-way
Mitigable/Unmitigable/Informational output, but the Informational tier
now produces an accurate \`action\` field for two cohorts where the
generic message was misleading.

Closes #74 in part (build-script-only /
vendored-pin name-list portion).
Closes #75.

## Cohort E-3 — build-script-only / vendored-pin (#74, partial)

A naive \`cargo machete --fix\` strip of certain phantom-declared crates
breaks the build inscrutably (cross-compile TLS, native-lib resolution,
build-time codegen). New \`is_build_script_only_or_vendored_pin(name)\`
predicate covers crates that **have no \`use\` site by design**:

- Build-script side-effect crates: \`pkg-config\`, \`cc\`, \`bindgen\`,
\`cmake\`, \`autocfg\`, \`vcpkg\`, \`winres\`, \`embed-resource\`
- Canonical vendored-pin: \`openssl-src\`

When a phantom-declared crate matches, the action flips from \"Strip
from Cargo.toml\" to \"DO NOT STRIP — load-bearing via build.rs
side-effects or native-lib linkage\".

**Future follow-up**: feature-based detection (e.g. \`openssl-sys = {
features = [\"vendored\"] }\`) needs feature-set plumbing through
\`ReachabilityEvidence\` — left out of scope.

## Cohort E-2 — Dioxus/GTK transitive (#75)

Phantom-transitive advisories where the parent is in the Dioxus desktop
family (\`wry\`, \`dioxus-desktop\`, \`dioxus\`) and the affected crate
is in the GTK/webkit family now get a Cohort E-2 message naming the
no-local-fix path (wait for parent release, or swap the desktop
renderer). Sub-rule covers \`printpdf\`→\`kuchiki\`.

GTK/webkit family matched: \`atk*\`, \`gdk*\`, \`gtk*\`, \`glib\`,
\`glib-sys\`, \`gio\`, \`gio-sys\`, \`gobject-sys\`, \`gtk3-macros\`,
\`proc-macro-error\`, \`paste\`, \`fxhash\`, \`webkit2gtk\`,
\`webkit2gtk-sys\`.

## Bonus repair: src/assail/analyzer.rs test-module corruption

The squash-merge sequence of PRs #71 (Julia) → #77 (refile of #72
vendored-snapshot) → #73 (flake.lock) left \`src/assail/analyzer.rs\`
with an unclosed-delimiter at line 7962:

- \`count_julia_dce\` had \`flake_findings\` body
- \`julia_ext_jl_dce_is_exempt\` was missing closing braces
- Two flake tests (\`flake_without_lock_is_low_severity\`,
\`flake_with_narhash_has_no_finding\`) had landed inside the Julia
section

\`cargo test --lib\` was failing to compile on main as a result. This PR
reassembles each section in its intended location; no test logic
changed.

## Test plan

- [x] \`cargo test --features http --lib bridge::classify::\` — 14/14
pass (5 new + 9 existing)
- [x] \`cargo test --features http --lib\` — 343 lib tests pass (was
previously failing to compile)
- [x] \`cargo check --features http\` — green

## Changes

- \`src/bridge/classify.rs\`: +268 / -29 lines (3 predicate fns + 2
cohort override branches + 5 regression tests)
- \`src/assail/analyzer.rs\`: +/-109 lines, net wash (reassemble
corrupted test sections)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 74 issues detected

Severity Count
🔴 Critical 7
🟠 High 16
🟡 Medium 51

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Issue in boj-build.yml",
    "type": "unknown",
    "file": "boj-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in cargo-audit.yml",
    "type": "unknown",
    "file": "cargo-audit.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "unknown",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "unknown",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "unknown",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in coverage.yml",
    "type": "unknown",
    "file": "coverage.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dependency-review.yml",
    "type": "unknown",
    "file": "dependency-review.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "unknown",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "unknown",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "unknown",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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.

1 participant