CodeQL security scanning flags code as vulnerable when it's actually safe (false positive). Need to dismiss the alert with proper documentation.
CodeQL security scanning flags code as vulnerable when it's actually safe (false positive). Need to dismiss the alert with proper documentation.
CodeQL uses static analysis patterns that may not understand context-specific security measures:
py/clear-text-storage-sensitive-data — flags hex-encoded secrets stored with restricted permissionspy/sql-injection — flags parameterized queriesjs/missing-rate-limit — flags rate-limited endpointsThe alert needs to be dismissed with a reason explaining why it's safe.
Expected Output:
On branch main
OKDismiss alert #37 for secrets.py:
curl -s -X PATCH \
-H "Authorization: token $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/Ikalus1988/MisakaNet/code-scanning/alerts/37 \
-d '{
"state": "dismissed",
"dismissed_reason": "false positive",
"dismissed_comment": "Federation shared secret stored as hex-encoded JSON with 0o600 permissions. Intentional for node-to-node auth."
}'