Skip to content
Open
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
3 changes: 2 additions & 1 deletion python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
return True
return False

slack_token = "xoxb-123456789012-1234567890123-abcdefghijklmnopqrstuvwx"

Check warning on line 9 in python/main.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/main.py#L9

Possible hardcoded password: 'xoxb-123456789012-1234567890123-abcdefghijklmnopqrstuvwx'

Check warning on line 9 in python/main.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

python/main.py#L9

Possible hardcoded password: 'xoxb-123456789012-1234567890123-abcdefghijklmnopqrstuvwx' (B105)

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Hardcoding sensitive credentials like Slack tokens directly in the source code is a major security vulnerability. If this repository is shared or public, the token is effectively compromised. You should load this value from an environment variable or a secure secret management service instead.

import os

slack_token = os.environ.get("SLACK_BOT_TOKEN")

See Issue in Codacy
See Issue in Codacy


if __name__ == '__main__':
try:
Expand All @@ -17,4 +18,4 @@
eval("foo")
except Exception:
pass