forked from cloudposse/build-harness
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile.security inside modules/python with python/bandit target (…
…cloudposse#52) * Add Makefile.security inside modules/python with python/bandit target * Use generic PYTHON_LINT_TARGETS since static analysis like bandit is indeed linting. Add newline to requirements.template * Combine common Lint and Security targets. Use lint Makefile style for securit Makefile
- Loading branch information
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
BANDIT=$(call which, bandit) | ||
BANDIT_FLAGS=-ll -ii | ||
|
||
|
||
.PHONY: python/security/targets | ||
python/security/targets: | ||
@VAR=( $(PYTHON_SECURITY_TARGETS) ); echo "Discovered $${#VAR[@]} files:" | ||
@echo "$$(echo $(PYTHON_SECURITY_TARGETS) | tr ' ' '\n')" | ||
|
||
.PHONY: python/security/announce/% | ||
python/security/announce/%: | ||
@VAR=( $(PYTHON_SECURITY_TARGETS) ); echo "Checking $${#VAR[@]} files with $*..." | ||
|
||
|
||
.PHONY: python/security/bandit | ||
python/security/bandit: bh/venv | ||
$(call assert-set,BANDIT) | ||
@$(MAKE) python/security/announce/bandit | ||
@$(BANDIT) $(PYTHON_SECURITY_TARGETS) $(BANDIT_FLAGS) | ||
|
||
.PHONY: python/security | ||
python/security: python/security/targets python/security/bandit | ||
|
||
.PHONY: python/scan | ||
python/scan: python/security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ flake8 | |
isort | ||
autoflake | ||
docker-compose | ||
bandit |