Skip to content

Commit c0d01a5

Browse files
feat(cicd_rules): add PMPL-1.0 + PMPL-1.0-or-later to @wrong_licenses (#381)
## Summary - Adds `PMPL-1.0` and `PMPL-1.0-or-later` to `cicd_rules/@wrong_licenses`. - Closes a known detection gap surfaced in today's Hypatia rules audit: the estate licence policy (2026-05-25) bans both MPL-1.0 and PMPL-1.0 in favour of MPL-2.0, but the scanner only enforced MPL-1.0. ## Why The estate-wide policy is "MPL-1.0 / PMPL-1.0 → MPL-2.0". `standards#249` just migrated 25 reusable workflow files; without this rule extension, the scanner could not catch the drift before merge. Now it can. ## Test plan - [x] Two new cases in `test/lang_policy_refresh_test.exs` (PMPL-1.0, PMPL-1.0-or-later) - [x] 15/15 tests pass via standalone elixir locally - [ ] CI green 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ec44d75 commit c0d01a5

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

lib/rules/cicd_rules.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,11 @@ defmodule Hypatia.Rules.CicdRules do
539539
# this list is consulted). MPL-1.0 / MPL-1.0-or-later are the only
540540
# legacy MPL identifiers seen in estate history; both must rewrite to
541541
# MPL-2.0 (org policy refresh 2026-05-25, applies to docs AND code).
542-
@wrong_licenses ["MIT", "Apache-2.0", "MPL-1.0", "MPL-1.0-or-later", "AGPL-3.0", "GPL-3.0"]
542+
#
543+
# PMPL-1.0 / PMPL-1.0-or-later (Palimpsest MPL) added 2026-05-28 after a
544+
# standards sweep found 25 reusable workflow files still carrying the
545+
# legacy PMPL header (standards#249). Same migration target: MPL-2.0.
546+
@wrong_licenses ["MIT", "Apache-2.0", "MPL-1.0", "MPL-1.0-or-later", "PMPL-1.0", "PMPL-1.0-or-later", "AGPL-3.0", "GPL-3.0"]
543547

544548
# Repos that legitimately use AGPL-3.0-or-later (co-developed with family, etc.)
545549
@agpl_exception_repos ["game-server-admin", "idaptik", "airborne-submarine-squadron"]

test/lang_policy_refresh_test.exs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ defmodule Hypatia.Rules.LangPolicyRefreshTest do
7979
CicdRules.validate_license("MPL-1.0-or-later")
8080
end
8181

82+
test "PMPL-1.0 is flagged as wrong_license (added 2026-05-28)" do
83+
assert {:error, :wrong_license, "PMPL-1.0"} =
84+
CicdRules.validate_license("PMPL-1.0")
85+
end
86+
87+
test "PMPL-1.0-or-later is flagged as wrong_license (added 2026-05-28)" do
88+
assert {:error, :wrong_license, "PMPL-1.0-or-later"} =
89+
CicdRules.validate_license("PMPL-1.0-or-later")
90+
end
91+
8292
test "MIT is still flagged" do
8393
assert {:error, :wrong_license, "MIT"} =
8494
CicdRules.validate_license("MIT")

0 commit comments

Comments
 (0)