Skip to content

Instantly share code, notes, and snippets.

@thierryturpin
Created June 12, 2020 11:36
Show Gist options
  • Save thierryturpin/808660ca3af0f355599224cfb83537ae to your computer and use it in GitHub Desktop.
Save thierryturpin/808660ca3af0f355599224cfb83537ae to your computer and use it in GitHub Desktop.
def sec_task():
local_file = "/tmp/secfile.txt"
with open(local_file, 'wt') as f:
print('dummy', file=f)
local_file = "/tmp/myfile.txt"
with open(local_file, 'wt') as f:
print('dummy', file=f)
# Let's fail the pipeline
filename = tempfile.mktemp() # Noncompliant
tmp_file = open(filename, "w+")
# Adding a bug
foo = 1 == "1" # Noncompliant. Always False.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment