cartography
cartography copied to clipboard
Add more controls in pre-commit, partly security
- detect-private-key
- check-added-large-files
- codespell
- detect-secrets
- semgrep
- bandit
- (black) if maintainers comfortable with it - https://black.readthedocs.io/en/stable/
By using Black, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.
Hi - It'd be easier to discuss these additions one by one since adding them all at once will be a big change to our CI. Is there one you'd like us to consider first?
order does not really matter if ending to merge all.
codespell is about code spelling detect-secrets try to prevent committing secrets in code semgrep and bandit are security code scanning tools
example run https://github.com/juju4/cartography/actions/runs/3863435878/jobs/6585623944#step:4:118
Choosing to use black will mean a big patch at first to get the code in the black style formatting, but going forward will make PRs more straight forward as the formatting style is black.
The MR looks large/scary, however 90% of the changes are strictly cosmetic e.g. fix spelling and lint error etc.
Notes:
- Not enabling
black
yet. - Added
TIMEOUT
torequests
call in two files. Modules impacted: Azure, Github. - Forced TLS verification in one file. Modules impacted: BigFix.
- Spelling error fixed for one variable in two files under AWS test.
- Use
yaml.SafeLoader
instead ofyaml.FullLoader
. Module imapced: AWS - Strictly cosmetic (spelling, lint etc.) changes in twenty six files.