@intentsolutionsio/penetration-tester 2.0.0 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +8 -3
- package/README.md +8 -0
- package/commands/pentest.md +5 -0
- package/package.json +8 -3
- package/skills/analyzing-tls-config/SKILL.md +221 -0
- package/skills/analyzing-tls-config/references/AUTHORIZATION.md +133 -0
- package/skills/analyzing-tls-config/references/PLAYBOOK.md +267 -0
- package/skills/analyzing-tls-config/references/THEORY.md +128 -0
- package/skills/analyzing-tls-config/scripts/analyze_tls.py +415 -0
- package/skills/auditing-cors-policy/SKILL.md +186 -0
- package/skills/auditing-cors-policy/references/PLAYBOOK.md +220 -0
- package/skills/auditing-cors-policy/references/THEORY.md +142 -0
- package/skills/auditing-cors-policy/scripts/audit_cors.py +350 -0
- package/skills/auditing-npm-dependencies/SKILL.md +254 -0
- package/skills/auditing-npm-dependencies/references/PLAYBOOK.md +175 -0
- package/skills/auditing-npm-dependencies/references/THEORY.md +122 -0
- package/skills/auditing-npm-dependencies/scripts/audit_npm.py +408 -0
- package/skills/auditing-python-dependencies/SKILL.md +251 -0
- package/skills/auditing-python-dependencies/references/PLAYBOOK.md +193 -0
- package/skills/auditing-python-dependencies/references/THEORY.md +122 -0
- package/skills/auditing-python-dependencies/scripts/audit_python.py +459 -0
- package/skills/checking-http-security-headers/SKILL.md +176 -0
- package/skills/checking-http-security-headers/references/PLAYBOOK.md +212 -0
- package/skills/checking-http-security-headers/references/THEORY.md +137 -0
- package/skills/checking-http-security-headers/scripts/check_headers.py +362 -0
- package/skills/checking-license-compliance/SKILL.md +225 -0
- package/skills/checking-license-compliance/references/PLAYBOOK.md +161 -0
- package/skills/checking-license-compliance/references/THEORY.md +152 -0
- package/skills/checking-license-compliance/scripts/check_licenses.py +461 -0
- package/skills/composing-vulnerability-report/SKILL.md +212 -0
- package/skills/composing-vulnerability-report/references/PLAYBOOK.md +180 -0
- package/skills/composing-vulnerability-report/references/THEORY.md +178 -0
- package/skills/composing-vulnerability-report/scripts/compose_report.py +396 -0
- package/skills/confirming-pentest-authorization/SKILL.md +247 -0
- package/skills/confirming-pentest-authorization/references/PLAYBOOK.md +189 -0
- package/skills/confirming-pentest-authorization/references/THEORY.md +167 -0
- package/skills/confirming-pentest-authorization/scripts/check_authorization.py +457 -0
- package/skills/defining-pentest-scope/SKILL.md +227 -0
- package/skills/defining-pentest-scope/references/PLAYBOOK.md +238 -0
- package/skills/defining-pentest-scope/references/THEORY.md +170 -0
- package/skills/defining-pentest-scope/scripts/define_scope.py +472 -0
- package/skills/detecting-command-injection-patterns/SKILL.md +144 -0
- package/skills/detecting-command-injection-patterns/references/PLAYBOOK.md +302 -0
- package/skills/detecting-command-injection-patterns/references/THEORY.md +206 -0
- package/skills/detecting-command-injection-patterns/scripts/scan_cmdi.py +290 -0
- package/skills/detecting-debug-endpoints/SKILL.md +207 -0
- package/skills/detecting-debug-endpoints/references/PLAYBOOK.md +402 -0
- package/skills/detecting-debug-endpoints/references/THEORY.md +218 -0
- package/skills/detecting-debug-endpoints/scripts/probe_debug.py +518 -0
- package/skills/detecting-directory-listing/SKILL.md +206 -0
- package/skills/detecting-directory-listing/references/PLAYBOOK.md +277 -0
- package/skills/detecting-directory-listing/references/THEORY.md +203 -0
- package/skills/detecting-directory-listing/scripts/probe_directory_listing.py +180 -0
- package/skills/detecting-eval-exec-usage/SKILL.md +128 -0
- package/skills/detecting-eval-exec-usage/references/PLAYBOOK.md +306 -0
- package/skills/detecting-eval-exec-usage/references/THEORY.md +159 -0
- package/skills/detecting-eval-exec-usage/scripts/scan_eval.py +223 -0
- package/skills/detecting-exposed-secrets-files/SKILL.md +179 -0
- package/skills/detecting-exposed-secrets-files/references/PLAYBOOK.md +274 -0
- package/skills/detecting-exposed-secrets-files/references/THEORY.md +174 -0
- package/skills/detecting-exposed-secrets-files/scripts/probe_secrets.py +207 -0
- package/skills/detecting-insecure-deserialization/SKILL.md +148 -0
- package/skills/detecting-insecure-deserialization/references/PLAYBOOK.md +333 -0
- package/skills/detecting-insecure-deserialization/references/THEORY.md +199 -0
- package/skills/detecting-insecure-deserialization/scripts/scan_deserialization.py +250 -0
- package/skills/detecting-sql-injection-patterns/SKILL.md +161 -0
- package/skills/detecting-sql-injection-patterns/references/PLAYBOOK.md +317 -0
- package/skills/detecting-sql-injection-patterns/references/THEORY.md +261 -0
- package/skills/detecting-sql-injection-patterns/scripts/scan_sqli.py +354 -0
- package/skills/detecting-ssl-cert-issues/SKILL.md +182 -0
- package/skills/detecting-ssl-cert-issues/references/PLAYBOOK.md +203 -0
- package/skills/detecting-ssl-cert-issues/references/THEORY.md +133 -0
- package/skills/detecting-ssl-cert-issues/scripts/check_cert_chain.py +481 -0
- package/skills/detecting-weak-cryptography/SKILL.md +147 -0
- package/skills/detecting-weak-cryptography/references/PLAYBOOK.md +466 -0
- package/skills/detecting-weak-cryptography/references/THEORY.md +194 -0
- package/skills/detecting-weak-cryptography/scripts/scan_weak_crypto.py +417 -0
- package/skills/fingerprinting-server-software/SKILL.md +191 -0
- package/skills/fingerprinting-server-software/references/PLAYBOOK.md +337 -0
- package/skills/fingerprinting-server-software/references/THEORY.md +183 -0
- package/skills/fingerprinting-server-software/scripts/fingerprint_server.py +347 -0
- package/skills/generating-executive-summary/SKILL.md +261 -0
- package/skills/generating-executive-summary/references/PLAYBOOK.md +201 -0
- package/skills/generating-executive-summary/references/THEORY.md +195 -0
- package/skills/generating-executive-summary/scripts/exec_summary.py +538 -0
- package/skills/mapping-findings-to-owasp-top10/SKILL.md +235 -0
- package/skills/mapping-findings-to-owasp-top10/references/PLAYBOOK.md +193 -0
- package/skills/mapping-findings-to-owasp-top10/references/THEORY.md +160 -0
- package/skills/mapping-findings-to-owasp-top10/scripts/map_owasp.py +540 -0
- package/skills/performing-penetration-testing/SKILL.md +282 -190
- package/skills/performing-penetration-testing/references/OWASP_TOP_10.md +22 -0
- package/skills/performing-penetration-testing/references/REMEDIATION_PLAYBOOK.md +46 -0
- package/skills/performing-penetration-testing/references/SECURITY_HEADERS.md +41 -0
- package/skills/performing-penetration-testing/scripts/code_security_scanner.py +144 -79
- package/skills/performing-penetration-testing/scripts/dependency_auditor.py +116 -93
- package/skills/performing-penetration-testing/scripts/security_scanner.py +574 -446
- package/skills/probing-dangerous-http-methods/SKILL.md +182 -0
- package/skills/probing-dangerous-http-methods/references/PLAYBOOK.md +234 -0
- package/skills/probing-dangerous-http-methods/references/THEORY.md +145 -0
- package/skills/probing-dangerous-http-methods/scripts/probe_methods.py +263 -0
- package/skills/recording-pentest-engagement/SKILL.md +253 -0
- package/skills/recording-pentest-engagement/references/PLAYBOOK.md +203 -0
- package/skills/recording-pentest-engagement/references/THEORY.md +195 -0
- package/skills/recording-pentest-engagement/scripts/record_engagement.py +461 -0
- package/skills/scanning-for-hardcoded-secrets/SKILL.md +215 -0
- package/skills/scanning-for-hardcoded-secrets/references/PLAYBOOK.md +325 -0
- package/skills/scanning-for-hardcoded-secrets/references/THEORY.md +175 -0
- package/skills/scanning-for-hardcoded-secrets/scripts/scan_secrets.py +395 -0
- package/skills/tracing-transitive-vulnerabilities/SKILL.md +235 -0
- package/skills/tracing-transitive-vulnerabilities/references/PLAYBOOK.md +233 -0
- package/skills/tracing-transitive-vulnerabilities/references/THEORY.md +138 -0
- package/skills/tracing-transitive-vulnerabilities/scripts/trace_vulns.py +484 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# PLAYBOOK — Policy Templates and Remediation
|
|
2
|
+
|
|
3
|
+
## Default policy templates
|
|
4
|
+
|
|
5
|
+
### Proprietary product (most common)
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"allow": ["MIT", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0", "ISC", "0BSD", "Unlicense", "CC0-1.0"],
|
|
10
|
+
"deny": ["GPL-2.0-only", "GPL-2.0-or-later", "GPL-3.0-only", "GPL-3.0-or-later", "AGPL-3.0-only", "AGPL-3.0-or-later"],
|
|
11
|
+
"review": ["LGPL-2.1-only", "LGPL-2.1-or-later", "LGPL-3.0-only", "LGPL-3.0-or-later", "MPL-2.0", "EPL-2.0", "CDDL-1.0"],
|
|
12
|
+
"project_license": "MIT"
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Strict: no GPL family. LGPL/MPL require dynamic-linking review.
|
|
17
|
+
|
|
18
|
+
### Internal-only tool (no distribution)
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"allow": ["MIT", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0", "ISC", "MPL-2.0", "EPL-2.0", "LGPL-3.0-or-later"],
|
|
23
|
+
"deny": ["AGPL-3.0-only", "AGPL-3.0-or-later"],
|
|
24
|
+
"review": ["GPL-2.0-only", "GPL-3.0-only"],
|
|
25
|
+
"project_license": "PROPRIETARY"
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Internal tools don't distribute, so GPL contamination is lower-risk
|
|
30
|
+
(only AGPL still poses a service-use issue if the internal tool
|
|
31
|
+
becomes externally accessible). GPL goes to review, not deny, so
|
|
32
|
+
the team is alerted but not blocked.
|
|
33
|
+
|
|
34
|
+
### OSS library (you publish under permissive license)
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"allow": ["MIT", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0", "ISC", "0BSD"],
|
|
39
|
+
"deny": ["GPL-2.0-only", "GPL-3.0-only", "AGPL-3.0-only", "LGPL-2.1-only", "LGPL-3.0-only", "MPL-2.0", "EPL-2.0", "CDDL-1.0"],
|
|
40
|
+
"review": [],
|
|
41
|
+
"project_license": "Apache-2.0"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Strictest — anything that could force a license change on downstream
|
|
46
|
+
users is denied. Better to refuse a dep than to push an Apache-2.0
|
|
47
|
+
license into a sea of new copyleft obligations.
|
|
48
|
+
|
|
49
|
+
### SaaS service (AGPL-aware)
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"allow": ["MIT", "BSD-3-Clause", "Apache-2.0", "ISC", "MPL-2.0", "LGPL-3.0-or-later"],
|
|
54
|
+
"deny": ["AGPL-3.0-only", "AGPL-3.0-or-later"],
|
|
55
|
+
"review": ["GPL-2.0-only", "GPL-3.0-only"],
|
|
56
|
+
"project_license": "PROPRIETARY"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
AGPL is the categorical no for SaaS. GPL is review-only because
|
|
61
|
+
SaaS distribution doesn't trigger GPL obligation (you're not
|
|
62
|
+
distributing the binary).
|
|
63
|
+
|
|
64
|
+
## Replacing copyleft deps with permissive alternatives
|
|
65
|
+
|
|
66
|
+
| Copyleft package | Permissive alternative | License |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `node-readline` (GPL-2.0) | `readline-sync` | MIT |
|
|
69
|
+
| `aspell` bindings (GPL-3.0) | `hunspell` (LGPL with binary linking exception) or `spellchecker` (MIT) | varies |
|
|
70
|
+
| `MySQL Connector/J` (GPL-2.0 with FOSS exception) | `MariaDB JDBC` (LGPL-2.1) | LGPL |
|
|
71
|
+
| `qt-py` (LGPL/GPL) | `PySide` (LGPL) or `PyQt` (GPL — same family) | LGPL preferred |
|
|
72
|
+
| `iText 7` (AGPL) | `Apache PDFBox` | Apache-2.0 |
|
|
73
|
+
| `ghostscript` (AGPL) | `MuPDF` (AGPL too — limited alternatives) | n/a; needs commercial license |
|
|
74
|
+
|
|
75
|
+
When no permissive alternative exists, options are:
|
|
76
|
+
|
|
77
|
+
1. **Buy a commercial license** from the upstream maintainer.
|
|
78
|
+
2. **Re-implement** the needed functionality.
|
|
79
|
+
3. **Vendor + relicense** if upstream is willing to dual-license.
|
|
80
|
+
4. **Architectural separation** — isolate the copyleft component
|
|
81
|
+
into a separate service / process / binary that's distributed
|
|
82
|
+
independently with its own source-availability commitment.
|
|
83
|
+
|
|
84
|
+
## Auto-generated NOTICE file
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
python3 ./scripts/check_licenses.py . --emit-attribution
|
|
88
|
+
# Produces ./NOTICE.md listing every permissively-licensed dep
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Include `NOTICE.md` in your release artifacts:
|
|
92
|
+
|
|
93
|
+
- npm: add it to `files` array in `package.json` so it's published
|
|
94
|
+
with the package.
|
|
95
|
+
- Python: add it to `MANIFEST.in` or `pyproject.toml`'s
|
|
96
|
+
`package_data` so it's included in the sdist + wheel.
|
|
97
|
+
- Docker images: `COPY NOTICE.md /usr/share/doc/<your-app>/NOTICE`
|
|
98
|
+
- Mobile / desktop apps: include in the about / credits screen.
|
|
99
|
+
|
|
100
|
+
## Legal-counsel handoff template
|
|
101
|
+
|
|
102
|
+
When escalating a finding to legal counsel, provide:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
PACKAGE: <name>@<version>
|
|
106
|
+
ECOSYSTEM: npm | pypi
|
|
107
|
+
DECLARED LICENSE: <license>
|
|
108
|
+
CLASSIFICATION: permissive | weak_copyleft | strong_copyleft | custom | unknown
|
|
109
|
+
USE CONTEXT: (a) build-time only / (b) ships in binary / (c) ships in service
|
|
110
|
+
DEPENDENCY DEPTH: direct | transitive (via <parent>)
|
|
111
|
+
PROJECT LICENSE: <license>
|
|
112
|
+
REMEDIATION COST: (estimate hours + alternative-package availability)
|
|
113
|
+
RISK IF UNRESOLVED: (compliance / contractual / brand)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This gives legal the minimum facts to advise. Don't ask "is this
|
|
117
|
+
OK?" — provide the facts and ask "given these facts, what's our
|
|
118
|
+
posture?" Counsel-advised exceptions go into the security register
|
|
119
|
+
with a re-evaluation date.
|
|
120
|
+
|
|
121
|
+
## Pre-release legal gate (CI)
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
- name: License compliance gate
|
|
125
|
+
run: |
|
|
126
|
+
python3 plugins/security/penetration-tester/skills/checking-license-compliance/scripts/check_licenses.py \
|
|
127
|
+
. --min-severity high --format json --output license-audit.json
|
|
128
|
+
jq -e '. == []' license-audit.json || {
|
|
129
|
+
echo "::error::License finding requires legal review before release"
|
|
130
|
+
exit 1
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## M&A due diligence playbook
|
|
135
|
+
|
|
136
|
+
When auditing an acquisition target:
|
|
137
|
+
|
|
138
|
+
1. Run the scanner against `target-codebase/` with `--include-dev`.
|
|
139
|
+
2. Cross-reference findings against the target's representation-and-
|
|
140
|
+
warranty schedule from the SPA (Stock Purchase Agreement).
|
|
141
|
+
3. For any finding NOT disclosed in the schedule, escalate to the
|
|
142
|
+
M&A legal team.
|
|
143
|
+
4. Re-run after the target's response to your due-diligence
|
|
144
|
+
questions — they may have local exceptions / commercial licenses
|
|
145
|
+
that resolve flagged findings.
|
|
146
|
+
|
|
147
|
+
## Quarterly review cadence
|
|
148
|
+
|
|
149
|
+
License findings have a longer remediation window than CVEs (no
|
|
150
|
+
active exploitation pressure), but the obligation doesn't go away.
|
|
151
|
+
Schedule quarterly:
|
|
152
|
+
|
|
153
|
+
- Re-run audit against the current main branch.
|
|
154
|
+
- Review the previous quarter's exceptions; promote / demote /
|
|
155
|
+
remove.
|
|
156
|
+
- Update `.license-policy.json` if the project's posture changed
|
|
157
|
+
(e.g. open-sourcing a previously-proprietary module).
|
|
158
|
+
|
|
159
|
+
Document the quarterly review in your security register; SOC2 and
|
|
160
|
+
ISO 27001 auditors look for evidence of ongoing license posture
|
|
161
|
+
management.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# THEORY — License Compliance for Software Distribution
|
|
2
|
+
|
|
3
|
+
## Why this is a security skill
|
|
4
|
+
|
|
5
|
+
License compliance isn't a vulnerability in the CVE sense, but the
|
|
6
|
+
consequences ladder is real:
|
|
7
|
+
|
|
8
|
+
1. **Re-licensing obligation.** Strong-copyleft contamination can
|
|
9
|
+
force you to release proprietary source code or accept a
|
|
10
|
+
distribution restriction you didn't intend.
|
|
11
|
+
2. **Contract breach.** Customer contracts often include
|
|
12
|
+
representation-and-warranty clauses about license posture. A
|
|
13
|
+
GPL-contaminated proprietary product can breach those.
|
|
14
|
+
3. **M&A blocker.** Code audits during M&A surface license issues
|
|
15
|
+
as a categorical risk; unresolved findings can re-price or kill
|
|
16
|
+
a deal.
|
|
17
|
+
4. **Revenue impact.** Public AGPL-licensed code in a SaaS product
|
|
18
|
+
can force source disclosure of the entire service, including
|
|
19
|
+
business logic.
|
|
20
|
+
|
|
21
|
+
The penetration-tester pack treats this as a security concern
|
|
22
|
+
because the failure modes (compliance gap, retroactive obligation,
|
|
23
|
+
brand impact) overlap with what a security program is chartered to
|
|
24
|
+
prevent.
|
|
25
|
+
|
|
26
|
+
## SPDX as the canonical vocabulary
|
|
27
|
+
|
|
28
|
+
SPDX (Software Package Data Exchange, ISO/IEC 5962:2021) is the
|
|
29
|
+
industry-standard way to express a license. The SPDX license list
|
|
30
|
+
covers ~600 licenses with a canonical short identifier (`MIT`,
|
|
31
|
+
`Apache-2.0`, `GPL-3.0-or-later`, etc.).
|
|
32
|
+
|
|
33
|
+
License expressions support boolean composition:
|
|
34
|
+
|
|
35
|
+
- `MIT OR Apache-2.0` — either license at the user's choice (common for permissively dual-licensed packages)
|
|
36
|
+
- `MIT AND CC-BY-4.0` — both licenses apply (e.g. code + docs split)
|
|
37
|
+
- `Apache-2.0 WITH LLVM-exception` — Apache + a named exception clause
|
|
38
|
+
|
|
39
|
+
The skill's parser handles the `OR`/`AND`/`WITH` cases by taking the
|
|
40
|
+
head license for classification. For OR-licensed packages, this is
|
|
41
|
+
conservative — the package is usable under the most permissive
|
|
42
|
+
option, but the classifier flags the most restrictive one in the
|
|
43
|
+
expression.
|
|
44
|
+
|
|
45
|
+
## License families (broad classification — NOT legal advice)
|
|
46
|
+
|
|
47
|
+
| Family | Examples | Obligation |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Public domain | CC0-1.0, Unlicense, 0BSD | None |
|
|
50
|
+
| Permissive | MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0, ISC | Attribution required; source disclosure NOT required |
|
|
51
|
+
| Weak copyleft | LGPL, MPL-2.0, EPL-2.0, CDDL-1.0 | Source disclosure of MODIFIED parts only; static-linking implications vary |
|
|
52
|
+
| Strong copyleft | GPL-2.0, GPL-3.0 | Source disclosure of the ENTIRE distributed work |
|
|
53
|
+
| Network copyleft | AGPL-3.0 | Source disclosure even when work is offered as a network service (no SaaS exception) |
|
|
54
|
+
| Custom / non-SPDX | "Proprietary", "Commercial", "All rights reserved" | Requires manual review; default copyright applies if no terms |
|
|
55
|
+
| Unknown | Empty license field, "UNKNOWN" | Requires investigation; default copyright applies |
|
|
56
|
+
|
|
57
|
+
The most-stepped-on case is **AGPL in a SaaS service**. AGPL was
|
|
58
|
+
designed specifically to close the "service" loophole in GPL: if
|
|
59
|
+
you offer GPL-licensed code as a network service, GPL doesn't
|
|
60
|
+
require source disclosure (you're not distributing). AGPL DOES.
|
|
61
|
+
This bites teams that pulled in AGPL deps thinking SaaS deployment
|
|
62
|
+
sidesteps the obligation.
|
|
63
|
+
|
|
64
|
+
## Copyleft contamination — the propagation model
|
|
65
|
+
|
|
66
|
+
Copyleft licenses include "viral" or "inheriting" clauses that
|
|
67
|
+
require any derivative work to be licensed under the same family.
|
|
68
|
+
The propagation rules vary by license:
|
|
69
|
+
|
|
70
|
+
- **GPL family** — propagates through static linking, dynamic linking, and code inclusion. A C library statically linked into your binary causes GPL inheritance.
|
|
71
|
+
- **LGPL family** — explicitly carves out an exception for dynamic linking, allowing LGPL libraries to be used by proprietary code at runtime.
|
|
72
|
+
- **MPL-2.0** — file-scoped copyleft; only modifications to MPL-licensed files trigger source disclosure, not the entire project.
|
|
73
|
+
- **EPL** — file-scoped, with patent grant.
|
|
74
|
+
|
|
75
|
+
For an interpreted language like Python or JavaScript, the
|
|
76
|
+
distinction between "static" and "dynamic" linking blurs.
|
|
77
|
+
Importing a GPL Python module into a non-GPL project arguably
|
|
78
|
+
creates a derivative work; conservative legal practice treats it
|
|
79
|
+
as GPL contamination.
|
|
80
|
+
|
|
81
|
+
## Common incompatibility pairs
|
|
82
|
+
|
|
83
|
+
The license-pair-incompatibility table is a minefield. Examples:
|
|
84
|
+
|
|
85
|
+
| Pair | Conflict |
|
|
86
|
+
|---|---|
|
|
87
|
+
| GPL-2.0-only + Apache-2.0 | GPLv2 has no patent grant; Apache-2.0's patent clauses conflict with GPLv2 terms. (GPLv3 resolves this.) |
|
|
88
|
+
| GPL-2.0-only + CDDL-1.0 | File-scoped vs project-scoped copyleft mutually incompatible. |
|
|
89
|
+
| MPL-1.1 + GPL-2.0-only | Old MPL (1.1) was not GPL-compatible; MPL-2.0 resolves it. |
|
|
90
|
+
| Apache-2.0 in GPL-2.0-only project | Apache patent termination clause incompatible with GPL-2.0. |
|
|
91
|
+
|
|
92
|
+
The skill flags known-incompatible pairs as HIGH severity. The
|
|
93
|
+
list is not exhaustive — true legal analysis requires counsel.
|
|
94
|
+
|
|
95
|
+
## When permissive licenses still create obligations
|
|
96
|
+
|
|
97
|
+
Even MIT and Apache-2.0 — the "permissive everything" licenses —
|
|
98
|
+
require:
|
|
99
|
+
|
|
100
|
+
- **Attribution.** The copyright notice and license text must
|
|
101
|
+
travel with the redistributed code. Failure to attribute is
|
|
102
|
+
technically a license violation.
|
|
103
|
+
- **NOTICE file for Apache-2.0.** If the project has a NOTICE
|
|
104
|
+
file, distributors must include it.
|
|
105
|
+
|
|
106
|
+
For a binary distribution (compiled app, mobile app, Electron
|
|
107
|
+
desktop, Lambda zip), the attribution requirement still applies —
|
|
108
|
+
you must include LICENSE / NOTICE / equivalent. The `--emit-attribution`
|
|
109
|
+
flag in this skill auto-generates a NOTICE.md listing every
|
|
110
|
+
permissively-licensed dep.
|
|
111
|
+
|
|
112
|
+
## Service-only vs binary distribution
|
|
113
|
+
|
|
114
|
+
AGPL's obligation triggers on "service" use. For a SaaS product:
|
|
115
|
+
|
|
116
|
+
- **You use AGPL code internally for tooling** → no obligation
|
|
117
|
+
(not distributed).
|
|
118
|
+
- **You use AGPL code in your service** → obligation: offer source
|
|
119
|
+
to every user of the service.
|
|
120
|
+
|
|
121
|
+
For a binary product:
|
|
122
|
+
|
|
123
|
+
- **You include AGPL code** → obligation: source disclosure to
|
|
124
|
+
every recipient of the binary.
|
|
125
|
+
|
|
126
|
+
Service-only deployment doesn't sidestep GPL, LGPL, or AGPL the
|
|
127
|
+
way some teams assume. The skill's CRITICAL findings flag this
|
|
128
|
+
explicitly when a project's stated `project_license` is
|
|
129
|
+
permissive but a dep is in the strong-copyleft family.
|
|
130
|
+
|
|
131
|
+
## Why "UNKNOWN" license is high-risk
|
|
132
|
+
|
|
133
|
+
A package with no license declaration is, by default, copyrighted
|
|
134
|
+
with all rights reserved. You technically have NO redistribution
|
|
135
|
+
rights. Even if the package is freely available on a public
|
|
136
|
+
registry, the absence of an explicit license doesn't grant you
|
|
137
|
+
permission to use it.
|
|
138
|
+
|
|
139
|
+
The skill flags UNKNOWN-license packages as MEDIUM severity. In
|
|
140
|
+
strict-compliance environments (regulated industries, government
|
|
141
|
+
contracts), MEDIUM should be promoted to HIGH.
|
|
142
|
+
|
|
143
|
+
## License-detection limitations
|
|
144
|
+
|
|
145
|
+
The skill reads metadata, not source. Specific failure modes:
|
|
146
|
+
|
|
147
|
+
1. **License declared incorrectly in metadata.** Some packages declare MIT in `package.json` but actually contain GPL code. Source-level inspection (e.g. ScanCode, FOSSology) is the gold standard.
|
|
148
|
+
2. **Multi-licensed packages with file-level variation.** Some packages have different licenses per file. Metadata captures the top-level intent but misses file-level exceptions.
|
|
149
|
+
3. **License changes between versions.** A package may switch from MIT to BUSL-1.1 in version N+1; if you pin to N you're under the old license. The skill audits the installed version.
|
|
150
|
+
|
|
151
|
+
For high-stakes legal posture (M&A, regulated products), pair this
|
|
152
|
+
skill with a source-level scanner.
|