A GitHub Action that scans your project dependencies for restrictive and incompatible licenses using Feluda.
- name: Scan licenses
uses: anistark/feluda@v1- name: Scan licenses with custom settings
uses: anistark/feluda@v1
with:
path: './my-project'
fail-on-restrictive: true
fail-on-incompatible: true
project-license: 'MIT'
update-badge: true
badge-path: 'README.md'| Name | Description | Required | Default |
|---|---|---|---|
path |
Path to the project directory to scan | No | ./ |
fail-on-restrictive |
Fail when restrictive licenses are found | No | true |
fail-on-incompatible |
Fail when incompatible licenses are found | No | false |
project-license |
Specify the project license (overrides auto-detection) | No | - |
update-badge |
Update README badge with scan results | No | true |
badge-path |
Path to README file for badge updates | No | README.md |
sbom-input |
Analyze an existing SPDX or CycloneDX JSON document instead of the project tree | No | - |
| Name | Description |
|---|---|
license-check |
Result of license check (success/failure) |
feluda-log |
Full output from Feluda scan |
restrictive-count |
Number of restrictive licenses found |
incompatible-count |
Number of incompatible licenses found |
name: Image License Check
on: [push]
jobs:
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Catalogue the image
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
syft ghcr.io/${{ github.repository }}:${{ github.sha }} -o spdx-json > image.spdx.json
- name: Scan the SBOM
uses: anistark/feluda@v1
with:
sbom-input: 'image.spdx.json'
fail-on-restrictive: truename: License Check
on: [push, pull_request]
jobs:
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check licenses
uses: anistark/feluda@v1
with:
fail-on-restrictive: true
fail-on-incompatible: true- name: Check licenses for Apache project
uses: anistark/feluda@v1
with:
project-license: 'Apache-2.0'
fail-on-incompatible: true- name: Check licenses only
uses: anistark/feluda@v1
with:
update-badge: false- name: Check licenses
id: license-check
uses: anistark/feluda@v1
- name: Comment on PR
if: steps.license-check.outputs.license-check == 'failure'
run: |
echo "Found ${{ steps.license-check.outputs.restrictive-count }} restrictive licenses"
echo "Found ${{ steps.license-check.outputs.incompatible-count }} incompatible licenses"If update-badge is enabled, the action will automatically update your README badge:
[](https://github.com/anistark/feluda)The badge color changes based on scan results:
- 🟢 Green (
brightgreen) - No issues found - 🔴 Red (
red) - Restrictive or incompatible licenses found
Licenses with conditions like:
source-disclosure(e.g., GPL, AGPL)network-use-disclosure(e.g., AGPL)
Licenses that may be incompatible with your project's license based on compatibility matrices.
Feluda automatically detects and scans dependencies for:
- Rust (Cargo.toml)
- Node.js (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml)
- Python (requirements.txt, Pipfile, pyproject.toml)
- Go (go.mod)
- C/C++ (conanfile.txt, conanfile.py, vcpkg.json, Makefile)
This action is MIT licensed. See LICENSE for details.