Skip to content
Open
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
14 changes: 14 additions & 0 deletions princenchiba_demo/no-eval-prince-demo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
print("Welcome to Semgrep!" + "Use our Run button to start experimenting -->")


print("...")

# To detect ALL calls to the print() function, change the Semgrep Rule from print("...") to print(...)

print(not_a_string)

print(first_var, second_var)

print()

# print("This is commented out so it will never be found")
30 changes: 30 additions & 0 deletions princenchiba_demo/no-eval-prince-demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
rules:
- id: no-eval-prince-demo
languages:
- javascript
severity: ERROR
message: Semgrep found a match
pattern: eval("...")
metadata:
category: security
subcategory:
- vuln
cwe:
- 'CWE-749: Exposed Dangerous Method or Function'
confidence: HIGH
likelihood: LOW
impact: MEDIUM
owasp:
- A3:2021 Injection
references:
- ''
technology:
- django
- docker
- dockerfile
- flask
- gorilla
- kubernetes
- nginx
- terraform
- react