ENGINEERING

Fail GitLab merge requests on disallowed dependency licenses

Runs as a GitLab merge-request pipeline step, scans added dependencies for forbidden licenses.

CategoryEngineering
Enginesim
Difficultyintermediate
Triggerevent
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab merge request eventGitLabGitLab
  • ActionExtract added or bumped dependencies from MR diffGitLabGitLab
  • ActionResolve and normalize SPDX license per packageGitLabGitLab
  • LogicEvaluate licenses against denylist and unknown rule
  • ActionFail the pipeline job on violationGitLabGitLab
  • OutputPost discussion note with offending packagesGitLabGitLab

What it does

This workflow hooks into GitLab merge request events and acts as a license compliance gate inside your pipeline. It reads the dependency changes introduced by the MR, resolves each new package's SPDX license, and fails the pipeline when any license falls outside your policy. It then posts a discussion note on the MR explaining which packages tripped the gate.

When to use it

Use this for GitLab-hosted projects where you enforce licensing through pipeline status rather than commit checks. Good for teams that already require green pipelines to merge and want license drift to be one of those required signals.

How it works

  1. 1A GitLab merge_request event triggers the workflow.
  2. 2It pulls the MR diff and extracts dependencies added or version-bumped in the manifest.
  3. 3Each package license is resolved and normalized to an SPDX identifier.
  4. 4A logic step evaluates licenses against your denylist and unknown-license rule.
  5. 5If clean, it reports a passing pipeline job and stops.
  6. 6On a violation it fails the pipeline job and adds a GitLab discussion note naming the non-compliant packages and licenses.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  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.