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

Consider adding pyupio/safety to the default pyproject.toml template #70

Open
ndejong opened this issue Nov 28, 2022 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@ndejong
Copy link

ndejong commented Nov 28, 2022

Consider adding pyupio/safety to the default pyproject.toml

I'm finding that having safety as a part of my Slap tests helps me stay aware of possible issues with dependencies sooner in the development cycle, thus saving time (ie shift-left SecDevops language) - other Slap users may find this helpful too.

[tool.slap.test]
safety = "pip freeze | safety check --stdin --output bare"

Also - totally love Slap and it's evolution from Slam and Shut - keep the tool going, it massively helps in delivering awesome Python packages.

@NiklasRosenstein
Copy link
Owner

NiklasRosenstein commented Dec 1, 2022

Hey @ndejong, I'm glad you enjoy Slap!

I think this is a good idea, I'll add it! :)

Is piping the output of pip freeze into safety any different from running safety check directly?

@NiklasRosenstein
Copy link
Owner

*Closed accidentally

@ndejong
Copy link
Author

ndejong commented Jan 9, 2023

Pardon my slow getting back to this, missed your followup question

Yes, I've found that using safety = "safety check" will cause the full-system Python packages to be included which means you'll get alerts for package-items that are not part of the project you're working with.

Also, worth a mention - I've found that my suggested option --output bare produces very limited output which can make it tough to spot why a slap test fails. On reflection it might be better to keep the default (albeit rather verbose) safety output and leave the user/developer to adjust as they see fit.

Hence:-

[tool.slap.test]
safety = "pip freeze | safety check --stdin"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants