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

vulnerabilities #2

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
75 changes: 75 additions & 0 deletions .cm/jit.cm
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
manifest:
version: 1.0
automations:
# Add labels
vulnerabilities:
if:
- {{ sonar.vulnerabilities.count > 0}}
run:
- action: add-label@v1
args:
label: '🛡️ x {{ sonar.vulnerabilities.count }} Vulnerabilities'
color: {{ colors.E if (sonar.vulnerabilities.rating == 'E') else (colors.C if (sonar.vulnerabilities.rating == 'C' ) else colors.A) }}
security_hotspots:
if:
- {{ sonar.security_hotspots.count > 0}}
run:
- action: add-label@v1
args:
label: '🌶️ x {{ sonar.security_hotspots.count }} Security Hotspots'
color: {{ colors.E if (sonar.security_hotspots.rating == 'E') else (colors.C if (sonar.security_hotspots.rating == 'C' ) else colors.A) }}
code_smells:
if:
- {{ sonar.code_smells.count > 0}}
run:
- action: add-label@v1
args:
label: '💩 x {{ sonar.code_smells.count }} Code Smells'
color: {{ colors.E if (sonar.code_smells.rating == 'E') else (colors.C if (sonar.code_smells.rating == 'C' ) else colors.A) }}
bugs:
if:
- {{ sonar.bugs.count > 0}}
run:
- action: add-label@v1
args:
label: '🐞 x {{ sonar.bugs.count }} Bugs'
color: {{ colors.E if (sonar.bugs.rating == 'E') else (colors.C if (sonar.bugs.rating == 'C' ) else colors.A) }}

mark_outstanding_pr:
if:
- {{ sonar.bugs.count == 0 }}
- {{ sonar.code_smells.count == 0 }}
- {{ sonar.vulnerabilities.count == 0 }}
- {{ sonar.security_hotspots.count == 0 }}
- {{ sonar.duplications == null or sonar.duplications == 0 }}
run:
- action: add-label@v1
args:
label: '💯 Safe'
Assign:
# Auto assign Security member
if:
- {{ sonar.code_smells.rating != 'A' or sonar.vulnerabilities.rating != 'A' or sonar.security_hotspots.rating != 'A'}}
run:
- action: add-reviewers@v1
args:
reviewers: [Dudu-linb]

jitttt:
if:
- {{ jit.metrics.HIGH > 0}}
run:
- action: add-label@v1
args:
label: '{{ jit.metrics.HIGH }} high vulns by Jit'


sonar: {{ pr | extractSonarFindings }}
#jit: {{ pr | extractJitFindings }}

colors:
A: '05AA02'
B: 'B6D146'
C: 'EABE05'
D: 'DF8339'
E: 'D4343F'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,4 @@ OWASP Juice Shop and any contributions are Copyright © by Bjoern Kimminich & th
2014-2023.

![Juice Shop Logo](https://raw.githubusercontent.com/bkimminich/juice-shop/master/frontend/src/assets/public/images/JuiceShop_Logo_400px.png)
123456🙈
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
"html-entities": "^1.3.1",
"i18n": "^0.11.1",
"js-yaml": "^3.14.0",
"jsonwebtoken": "0.4.0",
"jssha": "^3.1.1",
"juicy-chat-bot": "~0.7.1",
"libxmljs2": "^0.32.0",
Expand Down