mirror of
https://github.com/semgrep/skills.git
synced 2026-09-20 14:21:26 +08:00
make it very clear this is an example non-valid secret
This commit is contained in:
@@ -1867,7 +1867,7 @@
|
||||
"ruleId": "",
|
||||
"ruleTitle": "Avoid Hardcoded Secrets",
|
||||
"type": "bad",
|
||||
"code": "import requests\n\nheaders = {\"Authorization\": \"token ghp_emmtytndiqky5a98w0s98w36vfhiz6f7ed4c\"}\nresponse = requests.get(\"https://api.github.com/user\", headers=headers)",
|
||||
"code": "import requests\n\nheaders = {\"Authorization\": \"token ghp_emmtytndiqky5a98w0s98w36fakekey\"}\nresponse = requests.get(\"https://api.github.com/user\", headers=headers)",
|
||||
"language": "python",
|
||||
"description": "Python - hardcoded GitHub token"
|
||||
},
|
||||
|
||||
@@ -201,7 +201,7 @@ const client = stripe(process.env.STRIPE_SECRET_KEY);
|
||||
```python
|
||||
import requests
|
||||
|
||||
headers = {"Authorization": "token ghp_emmtytndiqky5a98w0s98w36vfhiz6f7ed4c"}
|
||||
headers = {"Authorization": "token ghp_emmtytndiqky5a98w0s98w36fakekey"}
|
||||
response = requests.get("https://api.github.com/user", headers=headers)
|
||||
```
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ const client = stripe(process.env.STRIPE_SECRET_KEY);
|
||||
```python
|
||||
import requests
|
||||
|
||||
headers = {"Authorization": "token ghp_emmtytndiqky5a98w0s98w36vfhiz6f7ed4c"}
|
||||
headers = {"Authorization": "token ghp_emmtytndiqky5a98w0s98w36fakekey"}
|
||||
response = requests.get("https://api.github.com/user", headers=headers)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user