Skip to content

Commit 9976434

Browse files
add bandit
1 parent 1ca9b75 commit 9976434

4 files changed

Lines changed: 405 additions & 243 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,4 @@ cython_debug/
240240
#.idea/
241241

242242
.ruff_cache
243+
bandit-report.json

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ lint: ## Run all linters
6969
$(PYTHON) ruff check --config pyproject.toml $(PYTHON_FILES)
7070
$(PYTHON) mypy --config-file pyproject.toml $(PYTHON_FILES)
7171

72+
.PHONY: security
73+
security: ## Run security scan with Bandit
74+
@echo "${BLUE}Running security scan...${NC}"
75+
$(PYTHON) bandit -r archipy/ -s B101,B301,B403 -x features,docs,scripts -f json -o bandit-report.json || true
76+
7277
.PHONY: behave
7378
behave: ## Run tests with behave
7479
@echo "${BLUE}Running tests...${NC}"
@@ -129,14 +134,15 @@ pre-commit: ## Run pre-commit hooks
129134
$(PRE_COMMIT) run --all-files
130135

131136
.PHONY: check
132-
check: lint test ## Run all checks (linting and tests)
137+
check: lint security test ## Run all checks (linting, security, and tests)
133138

134139
.PHONY: ci
135140
ci: ## Run CI pipeline locally
136141
@echo "${BLUE}Running CI pipeline...${NC}"
137142
$(MAKE) clean
138143
$(MAKE) install
139144
$(MAKE) lint
145+
$(MAKE) security
140146
$(MAKE) test
141147
$(MAKE) build
142148

0 commit comments

Comments
 (0)