Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .rhiza/rhiza.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export UV_VENV_CLEAR := 1

# Include split Makefiles
-include tests/tests.mk
-include security/security.mk
-include book/book.mk
-include book/marimo/marimo.mk
-include presentation/presentation.mk
Expand Down
17 changes: 17 additions & 0 deletions security/security.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## security.mk - Security scanning targets
# This file is included by the main Makefile.
# It provides targets for security vulnerability scans.

# Declare phony targets (they don't produce files)
.PHONY: security

##@ Security

# The 'security' target performs security vulnerability scans.
# 1. Runs pip-audit to check for known vulnerabilities in dependencies.
# 2. Runs bandit to find common security issues in the source code.
security: install ## run security scans (pip-audit and bandit)
@printf "${BLUE}[INFO] Running pip-audit for dependency vulnerabilities...${RESET}\n"
@${UVX_BIN} pip-audit
@printf "${BLUE}[INFO] Running bandit security scan...${RESET}\n"
@${UVX_BIN} bandit -r ${SOURCE_FOLDER} -ll -q
11 changes: 1 addition & 10 deletions tests/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# executing performance benchmarks.

# Declare phony targets (they don't produce files)
.PHONY: test benchmark typecheck security mutate docs-coverage
.PHONY: test benchmark typecheck mutate docs-coverage

# Default directory for tests
TESTS_FOLDER := tests
Expand Down Expand Up @@ -55,15 +55,6 @@ typecheck: install ## run mypy type checking
printf "${YELLOW}[WARN] Source folder ${SOURCE_FOLDER} not found, skipping typecheck${RESET}\n"; \
fi

# The 'security' target performs security vulnerability scans.
# 1. Runs pip-audit to check for known vulnerabilities in dependencies.
# 2. Runs bandit to find common security issues in the source code.
security: install ## run security scans (pip-audit and bandit)
@printf "${BLUE}[INFO] Running pip-audit for dependency vulnerabilities...${RESET}\n"
@${UVX_BIN} pip-audit
@printf "${BLUE}[INFO] Running bandit security scan...${RESET}\n"
@${UVX_BIN} bandit -r ${SOURCE_FOLDER} -ll -q

# The 'mutate' target performs mutation testing using mutmut.
# 1. Runs mutmut to apply mutations to the source code and check if tests fail.
# 2. Displays the results of the mutation testing.
Expand Down
Loading