Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move license-related hotwords to a rule #591

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ inputs:
urlparse
:disableDigestUpdates
pinDigest
NonCommercial
NoDerivs
BY-NC
BY-ND
debug:
description: enables debug output for this action
required: false
Expand Down
17 changes: 17 additions & 0 deletions assets/semgrep_rules/client/licensing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/">
<a property="dct:title" rel="cc:attributionURL" href="https://example.com">
The following JavaScript library
</a>
by
<a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://john.example.com">
John Doe
</a>
is licensed under
<a href="https://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">
// ruleid: license-nonfree
CC BY-NC 4.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Non-free license detected

Source: https://github.com/brave/security-action


Cc @thypon @bcaller

<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt="">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt="">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" alt="">
</a>
</p>
4 changes: 4 additions & 0 deletions assets/semgrep_rules/client/licensing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// ruleid: license-nonfree
This logo is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Non-free license detected

Source: https://github.com/brave/security-action


Cc @thypon @bcaller

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Non-free license detected

Source: https://github.com/brave/security-action


Cc @thypon @bcaller

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Non-free license detected

Source: https://github.com/brave/security-action


Cc @thypon @bcaller


See LICENSE.txt for more details.
9 changes: 9 additions & 0 deletions assets/semgrep_rules/client/licensing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rules:
- id: license-nonfree
message: "Non-free license detected"
severity: ERROR
languages:
- regex
patterns:
# ruleid: license-nonfree
- pattern-regex: (NonCommercial|NoDerivs|BY-NC|BY-ND)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Non-free license detected

Source: https://github.com/brave/security-action


Cc @thypon @bcaller

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] Non-free license detected

Source: https://github.com/brave/security-action


Cc @thypon @bcaller