General engineering
AuraScore 89/100

Open Source Dependency License Auditing Script

Automate package dependency license inspection and compliance enforcement in CI/CD pipelines.

Use this template when establishing automated software composition analysis and open-source license governance in build pipelines. It crafts a pipeline-ready script that audits transitive dependencies and blocks non-compliant code.

Template

Role: Staff Security and Open Source Governance Architect.

Context

  • Target language package manager and registry: {{package_ecosystem}}
  • Disallowed and high-risk licensing terms: {{prohibited_licenses}}
  • Approved enterprise and team-level overrides: {{approved_exception_list}}
  • Continuous integration pipeline environment: {{ci_platform}}
  • Desired audit summary and vulnerability format: {{reporting_output_format}}
  • Non-zero build break policy trigger: {{failure_threshold}}

Task

Write an automated dependency compliance audit script that scans third-party packages, verifies licensing against legal policy rules, generates standardized governance artifacts, and enforces continuous integration build gates.

Method

  1. Ingest manifest and lockfile trees native to {{package_ecosystem}}.
  2. Extract declared and inferred software license identifiers across transitive dependencies.
  3. Cross-reference identified licenses against restrictions outlined in {{prohibited_licenses}}.
  4. Apply exemption matching for specific packages listed in {{approved_exception_list}}.
  5. Calculate aggregate compliance metrics and score against {{failure_threshold}}.
  6. Serialize the full dependency audit report adhering to {{reporting_output_format}}.
  7. Emit deterministic CI status codes compatible with {{ci_platform}} to pass or halt builds.

Constraints

  • MUST fail with standard non-zero exit codes if unapproved licenses exceed {{failure_threshold}}.
  • MUST NOT trigger external network requests for known offline manifest evaluations.
  • Output artifact paths must be configurable via standard environment variables.
  • Avoid heavy external dependencies by utilizing native parsers where applicable.

Output format

Format the output into the following sections in order:

  1. Audit Script: Self-contained, production-grade script file with parameter flags and exit handlers.
  2. Pipeline Integration Guide: Step-by-step CI YAML snippet and environment variable reference table.

Self-review

  • Confirm seamless compatibility with the specified {{package_ecosystem}} lockfile structure.
  • Validate that {{prohibited_licenses}} and {{approved_exception_list}} evaluation logic handles dual-licensing scenarios.
  • Ensure exit code behavior correctly integrates with {{ci_platform}}.
AuraScore breakdown
89/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering10/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification14/14 · Strong

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-general
research-productivity-operations
compliance
cicd
open-source