fleetlint Policy for a fleet of repositories
v0.9
Getting started

deps/license-check/python

Dependency licenses are checked against an allowlist

Implements deps/license-check for python.

Severityinfo
Tiers1
Stackspython
Scopeeach
Kindoutcome
Sourcelibrary v0.6.0
Selected byfleetlint-recommended@v0.6.0

Requirement

A task-runner recipe or a CI step runs pip-licenses --allow-only=... (or --fail-on=...) or liccheck, or a stack-neutral license checker. pip-licenses without an allow or fail list only prints.

Why

A dependency under an incompatible license is found cheaply before it is merged and expensively after a release.

Parameters

  • runners: [../Makefile ../justfile ../Justfile ../Taskfile.yml ../Taskfile.yaml ../../Makefile ../../justfile ../../Justfile ../../Taskfile.yml ../../Taskfile.yaml ../../../Makefile ../../../justfile ../../../Justfile ../../../Taskfile.yml ../../../Taskfile.yaml]
  • skip: ^\s*[@+-]*\s*(\{\{[^}]*\}\}\s*|\$[({][A-Za-z_]+[)}]\s*)?(#|//|echo\b|printf\b|(sudo\s+)?(go (install|get)|cargo b?install|pipx? install|pip3 install|python3? -m pip install|uv (tool |pip )?(install|add)|(npm|pnpm|yarn|bun) (i|install|add|global add)|gem install|bundle add|brew install|dotnet tool (install|update)|composer (global )?require|apt(-get)? install|curl|wget)\b[^;&]*$)

Fix

Run pip-licenses --allow-only="MIT;BSD License;Apache Software License" in the audit target.

Agent instruction: Add the stack’s license checker to the audit target with an allowlist compatible with the repository’s own license; report dependencies outside it instead of widening the list.

A finding of this rule points at the file taskrunner.file != "" ? taskrunner.file : "Makefile" yields.

Sources


Generated by fleetlint docs from catalog v0.6.0.