Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print tags for projects #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

sebastianrevuelta
Copy link
Contributor

No description provided.

try:
SEMGREP_APP_TOKEN = os.getenv("SEMGREP_APP_TOKEN")
except KeyError:
print("Please set the environment variable SEMGREP_APP_TOKEN")
Copy link

Choose a reason for hiding this comment

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

Semgrep found a match

Suggested change
print("Please set the environment variable SEMGREP_APP_TOKEN")
logging.info("Please set the environment variable SEMGREP_APP_TOKEN")
Ignore this finding from avoid_print_python_rule.

print(project_name)
tags = project['tags']
for tag in tags:
print(tag)
Copy link

Choose a reason for hiding this comment

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

Semgrep found a match

Suggested change
print(tag)
logging.info(tag)
Ignore this finding from avoid_print_python_rule.

for project in data['projects']:
project_name = project['name']
print("************")
print(project_name)
Copy link

Choose a reason for hiding this comment

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

Semgrep found a match

Suggested change
print(project_name)
logging.info(project_name)
Ignore this finding from avoid_print_python_rule.

data = json.loads(r.text)
for project in data['projects']:
project_name = project['name']
print("************")
Copy link

Choose a reason for hiding this comment

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

Semgrep found a match

Suggested change
print("************")
logging.info("************")
Ignore this finding from avoid_print_python_rule.

sys.exit(f'Get failed: {r.text}')
data = json.loads(r.text)
slug_name = data['deployments'][0].get('slug')
print("Accessing org: " + slug_name)
Copy link

Choose a reason for hiding this comment

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

Semgrep found a match

Suggested change
print("Accessing org: " + slug_name)
logging.info(("Accessing org: " + slug_name))
Ignore this finding from avoid_print_python_rule.

@sebastianrevuelta
Copy link
Contributor Author

@pjzcodes could you review this PR and approve if you agree?

Copy link
Contributor

@armchairlinguist armchairlinguist left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but I don't really understand why it's a separate file. We already have two instances of scripts that fetch projects under API utilities; it would make more sense to me to add this functionality to one of them.

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.

2 participants