Skip to content

Commit a174f0c

Browse files
tbjersclaude
andcommitted
Add ScanCode license scanning workflow
Introduces a standalone License Scan workflow using aboutcode-org/scancode-action, replacing the intended FOSSA integration. Runs on all pull requests and pushes to main, scanning the codebase and enforcing a license policy (check-compliance at ERROR level) backed by policies.yml. - .github/workflows/scancode.yml: scan_codebase pipeline emitting JSON/SPDX/CycloneDX SBOMs; actions SHA-pinned per repo convention. - policies.yml: approves permissive (MIT/Apache/BSD/ISC) licenses, denies copyleft (GPL/AGPL/LGPL) as error. - README.md: adds the built-in GitHub Actions status badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 54c9bf4 commit a174f0c

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

.github/workflows/scancode.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: License Scan
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
env:
9+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
scan:
16+
name: ScanCode
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20+
with:
21+
path: scancode-inputs
22+
23+
- uses: aboutcode-org/scancode-action@e46d127dfbe502ad2699fbbba8efedad1b2adbd1 # beta
24+
with:
25+
pipelines: "scan_codebase"
26+
output-formats: "json spdx cyclonedx"
27+
check-compliance: true
28+
compliance-fail-level: "ERROR"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# coverage-tracker
22

33
![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fdemo.coveragetracker.dev%2Fapi%2Fbadge%2FCoverageTracker%2Fcoverage-tracker%2Fcoverage.json)
4+
[![License Scan](https://github.com/CoverageTracker/coverage-tracker/actions/workflows/scancode.yml/badge.svg)](https://github.com/CoverageTracker/coverage-tracker/actions/workflows/scancode.yml)
45

56
A self-hosted dashboard that tracks code coverage, cyclomatic complexity, and code duplication across your GitHub repositories — with trend charts, per-PR diff checks, and README badges.
67

policies.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
license_policies:
2+
# Approved — permissive, MIT-compatible
3+
- license_key: mit
4+
label: Approved License
5+
compliance_alert: ''
6+
- license_key: apache-2.0
7+
label: Approved License
8+
compliance_alert: ''
9+
- license_key: bsd-new
10+
label: Approved License
11+
compliance_alert: ''
12+
- license_key: bsd-simplified
13+
label: Approved License
14+
compliance_alert: ''
15+
- license_key: isc
16+
label: Approved License
17+
compliance_alert: ''
18+
- license_key: 0bsd
19+
label: Approved License
20+
compliance_alert: ''
21+
- license_key: unlicense
22+
label: Approved License
23+
compliance_alert: ''
24+
- license_key: cc0-1.0
25+
label: Approved License
26+
compliance_alert: ''
27+
- license_key: python
28+
label: Approved License
29+
compliance_alert: ''
30+
# Prohibited — strong copyleft, incompatible with MIT distribution
31+
- license_key: gpl-2.0
32+
label: Prohibited License
33+
compliance_alert: error
34+
- license_key: gpl-3.0
35+
label: Prohibited License
36+
compliance_alert: error
37+
- license_key: agpl-3.0
38+
label: Prohibited License
39+
compliance_alert: error
40+
- license_key: lgpl-3.0
41+
label: Prohibited License
42+
compliance_alert: error

0 commit comments

Comments
 (0)