Skip to content

Conversation

@cameronwaterman
Copy link
Collaborator

TEST PR TO BE CLOSED

Added intentionally insecure code examples for SAST testing.
@ni-github-admins
Copy link

Snyk checks have failed. 2 issues have been found so far.

Status Scanner Critical High Medium Low Total (2)
Code Security 0 2 0 0 2 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

"""
# Hardcoded secrets / credentials
password = "P@ssw0rd!" # hardcoded password
api_key = "AKIA1234567890FAKE" # fake AWS-style access key

Choose a reason for hiding this comment

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

  Hardcoded Non-Cryptographic Secret

Avoid hardcoding values that are meant to be secret. Found a hardcoded string used in here.

Line 124 | CWE-547 | Priority score 820
Data flow: 2 steps

Step 1 - 2

api_key = "AKIA1234567890FAKE" # fake AWS-style access key


# Insecure HTTP request (certificate verification disabled)
import requests
r = requests.get(url, verify=False)

Choose a reason for hiding this comment

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

  Improper Certificate Validation - SSL Verification Bypass

Certificate verification is disabled by setting verify to False in requests.get. This may lead to Man-in-the-middle attacks.

Line 146 | CWE-295 | Priority score 820
Data flow: 3 steps

Step 1 - 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants