SECOPS

Block PRs that pull in copyleft-licensed dependencies

On every pull request, scans changed dependency manifests for newly added packages, flags any GPL/AGPL/copyleft license.

CategorySecOps
Enginesim
Difficultyintermediate
Triggerevent
Steps4
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPull request opened or updatedGitHubGitHub
  • ActionResolve licenses of newly added dependenciesGitHubGitHub
  • LogicMatch licenses against copyleft denylist
  • OutputPost comment and set failing commit statusGitHubGitHub

What it does

This workflow turns license compliance into a hard merge gate. Whenever a pull request touches a dependency manifest (package.json, requirements.txt, go.mod, Cargo.toml, and friends), it diffs the lockfile to find packages that are genuinely *new* to the tree, resolves each one's SPDX license, and compares it against your forbidden list. If a copyleft license such as GPL-2.0, GPL-3.0, AGPL-3.0, or SSPL appears, the PR's status check goes red and a comment is posted that names the package, version, license, and which manifest introduced it. Permissively licensed additions (MIT, Apache-2.0, BSD) pass silently.

When to use it

Use it on any proprietary codebase where shipping copyleft code would create a redistribution obligation your legal team has not approved. It is the safety net for teams that move fast and merge often, where a single transitive dependency can quietly drag in an AGPL package nobody reviewed.

How it works

  1. 1A GitHub pull request trigger fires on open and synchronize events.
  2. 2The workflow fetches the changed manifest and lockfile diff to isolate newly introduced packages, then resolves each package's SPDX license from the registry metadata.
  3. 3A logic step checks every resolved license against the configured copyleft denylist.
  4. 4If any match, GitHub posts a review comment listing each offending package and version, and the workflow sets a failing commit status that blocks merge.

Tune the denylist and allowlist to match your legal policy.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  3. 3
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  4. 4
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.