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

New vulns #2 #12

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
803e2ae
Update package.json
PavelLinearB May 21, 2023
bf82f6b
fixed vulns
PavelLinearB May 21, 2023
725c2ae
Merge pull request #1 from linear-b/fix-vulns-and-add-cm
PavelLinearB May 21, 2023
4bb0105
cm ignored accept
PavelLinearB May 22, 2023
43882b9
cm ignored accept2
PavelLinearB May 22, 2023
8b00d4d
cm ignored accept3
PavelLinearB May 22, 2023
2f6c057
cm ignored accept4
PavelLinearB May 22, 2023
89dce43
cm ignored accept4
PavelLinearB May 22, 2023
32c3dee
cm ignored accept5
PavelLinearB May 22, 2023
0c9fdf3
cm ignored accept
PavelLinearB May 22, 2023
4ae68c1
cm ignored accept2
PavelLinearB May 22, 2023
fd348f7
cm ignored accept0
PavelLinearB May 22, 2023
f39ef39
Merge pull request #3 from linear-b/cm_ignored_accept
PavelLinearB May 22, 2023
0a8ae9e
cm ignored accept0
PavelLinearB May 22, 2023
273dcbc
cm ignored accept0
PavelLinearB May 22, 2023
6df1227
cm jit dump
PavelLinearB May 22, 2023
e5b00ae
Update jit.cm
PavelLinearB May 22, 2023
a5f954b
Update jit.cm
PavelLinearB May 22, 2023
4f5f6c5
Jit find secrets
PavelLinearB May 23, 2023
d930e1d
Merge branch 'master' of github.com:linear-b/juice-shop
PavelLinearB May 23, 2023
00b092c
Jit find secrets
PavelLinearB May 23, 2023
ee82a09
Update jit.cm
PavelLinearB May 23, 2023
254299d
Update and rename jit.cm to jit-and-sonar.cm
yeelali14 May 29, 2023
0c23617
Update jit-and-sonar.cm
yeelali14 May 29, 2023
efef0ad
added security manager cm
PavelLinearB Jun 6, 2023
ebd2ada
added security manager cm
PavelLinearB Jun 6, 2023
81fc4c3
added security manager cm
PavelLinearB Jun 6, 2023
fbbf10d
added security manager cm
PavelLinearB Jun 6, 2023
fe95bcd
added security manager cm
PavelLinearB Jun 6, 2023
14dc9bd
changes to securityManager.cm
PavelLinearB Jun 6, 2023
95169dc
vulnerabilities
PavelLinearB May 21, 2023
327b2b8
Update README.md
PavelLinearB May 22, 2023
04efc67
Update README.md
PavelLinearB Jun 6, 2023
169dd50
Update README.md
PavelLinearB Jun 6, 2023
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
36 changes: 36 additions & 0 deletions .cm/SecurityManager.cm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
manifest:
version: 1.0

automations:
debug:
if:
- true
run:
- action: add-comment@v1
args:
comment: |
PR: {{ pr | dump | safe }}

Security_comment:
if:
- {{ jit.metrics.HIGH > 0 }}
- {{ pr.conversations | filter(attr='commenter', term='gitstream-cm') | filter (attr='content', term='This PR failed due to High severity vulnerability finding, if you don't fix it please select:') | nope }}
run:
- action: add-comment@v1
args:
comment: |
This PR failed due to High severity vulnerability finding, if you don't fix it please select:
- [ ] I need help with that fix.
- [ ] I want to accept the risk, please approve.
- [ ] This is false positive, please approve.
- [ ] This is a test / simulator environment, please exclude.

Security_comment_response:
if:
- {{ pr.conversations | filter(attr='commenter', term='gitstream-cm') | filter (attr='content', term='- [x] I need help with that fix.') | some}}
run:
- action: add-label@v1
args:
label: "Fix pending"

jit: {{ pr | extractJitFindings }}
106 changes: 106 additions & 0 deletions .cm/jit-and-sonar.cm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# -*- mode: yaml -*-

manifest:
version: 1.0

config:
admin:
users: ['EladKohavi']

automations:
mark_bugs:
if:
- {{ sonar.bugs.count > 0 }}
run:
- action: add-label@v1
args:
label: '{{ sonar.bugs.count }} Bugs 🐞'
color: {{ colors.bugs }}
mark_code_smell:
if:
- {{ sonar.code_smells.count > 0 }}
run:
- action: add-label@v1
args:
label: '{{ sonar.code_smells.count }} Code Smells 💩'
color: {{ colors.code_smells }}
mark_security_hotspots:
if:
- {{ sonar.security_hotspots.count > 0 }}
run:
- action: add-label@v1
args:
label: '{{ sonar.security_hotspots.count }} Security hotspots 🌶️'
color: {{ colors.security_hotspots }}
- action: add-reviewers@v1
args:
reviewers: [Dudu-linb]
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.0 }}
run:
- action: add-label@v1
args:
label: '✅ Sonar: Clean Code'
color: '0e8a16'
high_duplications:
if:
- {{ sonar.duplications > 40 }}
run:
- action: request-changes@v1
args:
comment: |
High percentage of duplications in code. Please fix!
- action: add-label@v1
args:
label: '{{ sonar.duplications }} Duplications 👯'
color: {{ colors.duplications }}
mark_vulnerabilities:
if:
- {{ sonar.vulnerabilities.count > 0 }}
run:
- action: add-label@v1
args:
label: '{{ sonar.vulnerabilities.count }} Vulnerabilities 🛡️'
color: {{ colors.vulnerabilities }}
jit_vulns:
if:
- {{ jit.metrics.HIGH > 0}}
run:
- action: add-label@v1
args:
label: '🛡️ x {{ jit.metrics.HIGH }} High vulnerabilities'
- action: add-reviewers@v1
args:
reviewers: [Dudu-linb]

jit_secretss:
if:
- {{ jit.vulnerabilities | match(attr='security_control', term='Secret Detection') | some }}
run:
- action: add-label@v1
args:
label: "🤫 PR with secrets"

jit_ignores:
if:
- {{ pr.conversations | reject(attr='commenter', term='jit-ci') | map(attr='content') | match(term='#jit_ignore_accept') | some }}
run:
- action: add-label@v1
args:
label: '🙈 jit_ignore_accept'



sonar: {{ pr | extractSonarFindings }}
jit: {{ pr | extractJitFindings }}
colors:
code_smells: 'D2B48C'
bugs: 'FAA0A0'
vulnerabilities: 'F3E5AB'
security_hotspots: 'F89880'
duplications: 'D7BDE2'
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,5 @@ 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🙈🤫
Update!
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
Loading