src/skills/x-validate-dependency-policy/SKILL.md
Conditional dep-policy gate: CVEs, licenses, versions, freshness; SARIF + report.
npx skillsauth add edercnj/ia-dev-environment x-validate-dependency-policyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Validates all project dependencies against the dependencies.policy block declared in the project YAML (parsed into DependencyPolicyConfig — Rule 32). Applies the D-R10 enforcement matrix (block-on) and the D-R11 scope policy to each finding, emitting:
DEP_POLICY_BLOCK) — at least one BLOCK-level violation (denied CVE, license, min-version, or scope escalation)DEP_POLICY_WARN) — zero BLOCK violations; at least one WARN_ONLY violation (non-blocking)Produces evidence artifact at .aikittools/features/feature-XXXX/reports/dep-policy-validation-report-STORY-ID.md (required by Rule 27 Surface 13 — conditional on quality.dependencyPolicy.enabled=true).
/x-validate-dependency-policy — validate all dependency dimensions/x-validate-dependency-policy --story-id story-0074-0001 — emit evidence artifact for the given story/x-validate-dependency-policy --dry-run — enumerate violations without applying BLOCK/WARN exits| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| --story-id | String | — | Story identifier for evidence artifact path resolution |
| --report | Path | auto-resolved | Override artifact output path |
| --dry-run | Boolean | false | Run validation without producing exit-code enforcement |
Activated when dependencies.policy.enabled: true in project YAML. When disabled (or field absent), skill emits DEP_POLICY_DISABLED log line and exits 0 immediately — no validation performed, no artifact produced.
| Artifact | Path |
|----------|------|
| Validation report | .aikittools/features/feature-XXXX/reports/dep-policy-validation-report-STORY-ID.md (auto-resolved or via --report) |
| Sections | Header / Summary / Blocking Violations / Warning Violations / Suppressed / Policy Snapshot |
| Exit codes | 0 (disabled/clean) / 1 DEP_POLICY_BLOCK / 2 DEP_POLICY_WARN |
1. LOAD -> Read DependencyPolicyConfig (denied-cves, allowed-licenses, min/max-versions, freshness-window-days, block-on, scope-policy)
2. DETECT -> Resolve manifests (pom.xml / package.json / go.mod / etc.) + per-stack dependency-list commands
3. RESOLVE -> Parse to Dependency{coordinate, version, scope, age_days}; map devDependencies→dev, dependencies→compile
4. VALIDATE -> 5 dimensions per dep: denied-cve (RULE-074-01 hard-block) / license / min-version / max-version / freshness
5. CLASSIFY -> Apply D-R10 block-on + D-R11 scope-policy demotion; denied-CVE bypasses all overrides
6. REPORT -> _TEMPLATE-DEP-POLICY-REPORT.md; exit by highest severity
Detailed YAML schema, per-dimension validation logic, classification matrix (D-R10 × D-R11), and report template in references/full-protocol.md:
dependencies.policy block with all 7 sub-keys and example values.dependency:list format, npm --json scope mapping, Go go list -m -json Module.Path/Version).npm audit, trivy).LICENSE_UNRESOLVABLE WARN fallback.* wildcard support; NpmConstraint exact; GoConstraint prefix).mvn versions:display-dependency-updates; FRESHNESS_UNAVAILABLE skip fallback.min(raw, scope) by severity); classification matrix example for test scope.| Condition | Exit | Code | Action |
|-----------|------|------|--------|
| Policy disabled (enabled=false) | 0 | DEP_POLICY_DISABLED | Log + exit 0; no artifact |
| Policy YAML parse error | 1 | POLICY_PARSE_ERROR | Log ConfigValidationException message |
| No manifest found | 1 | MANIFEST_NOT_FOUND | Log which files were probed |
| CVE scanner unavailable | 0 | CVE_SCAN_UNAVAILABLE | Skip CVE dimension; continue remaining checks |
| License unresolvable | — | LICENSE_UNRESOLVABLE | Log as WARN; continue |
| Freshness data unavailable | — | FRESHNESS_UNAVAILABLE | Skip freshness dimension; continue |
x-implement-story Phase 3 §3.Q.dep when quality.dependencyPolicy.enabled=true (Rule 27 Surface 13, Rule 24 §Mandatory Evidence Artifacts).x-audit-dependencies via shared --policy flag: x-audit-dependencies --scope all --policy delegates policy validation to this skill after completing the standard audit..aikittools/features/feature-XXXX-<slug>/reports/dep-policy-validation-report-STORY-ID.md.Minimum viable contract above. Detailed YAML schema reference, 6-step procedure (load → detect manifests → resolve dependencies → validate 5 dimensions → classify with D-R10 + D-R11 → report and exit), per-stack constraint matching rules, classification algorithm with denied-CVE hard-block override, and RULE-074-01 contract live in references/full-protocol.md per ADR-0012 (skill body slim-by-default).
ADR-0027 — Dependency Policy and SCA Gate: Defines dependency policy YAML block and DependencyPolicyConfig config schema.
development
Documentation freshness gate: validates 6 dimensions (readme, api, adr, etc.) per PR.
documentation
Incrementally updates the service or system architecture document; never regenerative.
development
Scans code and git history for leaked credentials, API keys, and tokens; SARIF output.
testing
DAST gate: ZAP + Nuclei (passive/active); SARIF + Markdown; blocks on HIGH/CRITICAL.