Skip to content

Commit

Permalink
security check workaround to ignore misbehaving bandit excludes not c…
Browse files Browse the repository at this point in the history
…onsidered (relates to PyCQA/bandit#657)
  • Loading branch information
fmigneault committed Oct 3, 2022
1 parent d98492d commit 4be442e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -532,8 +532,9 @@ check-security-deps-only: mkdir-reports ## run security checks on package depen
$(SAFETY_IGNORE) \
1> >(tee "$(REPORTS_DIR)/check-security-deps.txt")'

# FIXME: bandit excludes not working (https://github.com/PyCQA/bandit/issues/657), clean-src beforehand to avoid error
.PHONY: check-security-code-only
check-security-code-only: mkdir-reports ## run security checks on source code
check-security-code-only: mkdir-reports clean-src ## run security checks on source code
@echo "Running security code checks..."
@-rm -fr "$(REPORTS_DIR)/check-security-code.txt"
@bash -c '$(CONDA_CMD) \
Expand Down
22 changes: 11 additions & 11 deletions setup.cfg
Expand Up @@ -5,23 +5,23 @@ tag = True
tag_name = {new_version}

[bumpversion:file:CHANGES.rst]
search =
search =
`Unreleased <https://github.com/crim-ca/weaver/tree/master>`_ (latest)
========================================================================
replace =
replace =
`Unreleased <https://github.com/crim-ca/weaver/tree/master>`_ (latest)
========================================================================

Changes:
--------
- No change.

Fixes:
------
- No change.

.. _changes_{new_version}:

`{new_version} <https://github.com/crim-ca/weaver/tree/{new_version}>`_ ({now:%%Y-%%m-%%d})
========================================================================

Expand All @@ -42,14 +42,14 @@ search = LABEL version="{current_version}"
replace = LABEL version="{new_version}"

[tool:pytest]
addopts =
addopts =
--strict-markers
--tb=native
weaver/
log_cli = false
log_level = DEBUG
python_files = test_*.py
markers =
markers =
cli: mark test as related to CLI operations
testbed14: mark test as 'testbed14' validation
functional: mark test as functionality validation
Expand Down Expand Up @@ -80,7 +80,7 @@ targets = .
[flake8]
ignore = E126,E226,E402,F401,W503,W504
max-line-length = 120
exclude =
exclude =
src,
.git,
__pycache__,
Expand Down Expand Up @@ -112,14 +112,14 @@ add_select = D201,D213
branch = true
source = ./
include = weaver/*
omit =
omit =
setup.py
docs/*
tests/*
*_mako

[coverage:report]
exclude_lines =
exclude_lines =
pragma: no cover
raise AssertionError
raise NotImplementedError
Expand Down

0 comments on commit 4be442e

Please sign in to comment.