Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into matt/regal
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-phylum committed Apr 29, 2024
2 parents 98e2080 + f1b92a2 commit 2fc1f34
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions license_agpl.rego
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package policy

import rego.v1

is_agpl if {
regex.match(`(?i)\bAffero\b`, data.dependency.license)
}

is_agpl if {
regex.match(`(?i)\bAGPL\b`, data.dependency.license)
}

# Returns a violation if the package license metadata indicates "Affero" or "AGPL"
# METADATA
# scope: rule
# schemas:
# - data.issue: schema.issue
dependency contains "AGPL licensed software is not allowed" if {
is_agpl
}

0 comments on commit 2fc1f34

Please sign in to comment.