diff --git a/.calcipy_packaging.lock b/.calcipy_packaging.lock index b67aa369..46a336a6 100644 --- a/.calcipy_packaging.lock +++ b/.calcipy_packaging.lock @@ -63,14 +63,6 @@ "name": "babel", "version": "2.15.0" }, - "bandit": { - "datetime": "2024-03-08T19:25:54.618041+00:00", - "domain": "https://pypi.org/pypi/{name}/json", - "latest_datetime": "2024-03-08T19:25:54.618041+00:00", - "latest_version": "1.7.8", - "name": "bandit", - "version": "1.7.8" - }, "basedpyright": { "datetime": "2024-05-29T13:03:04.128263+00:00", "domain": "https://pypi.org/pypi/{name}/json", @@ -575,14 +567,6 @@ "name": "pathspec", "version": "0.12.1" }, - "pbr": { - "datetime": "2023-11-07T18:32:21.527935+00:00", - "domain": "https://pypi.org/pypi/{name}/json", - "latest_datetime": "2023-11-07T18:32:21.527935+00:00", - "latest_version": "6.0.0", - "name": "pbr", - "version": "6.0.0" - }, "pip": { "datetime": "2024-02-03T09:53:09.575683+00:00", "domain": "https://pypi.org/pypi/{name}/json", @@ -863,14 +847,6 @@ "name": "sortedcontainers", "version": "2.4.0" }, - "stevedore": { - "datetime": "2024-02-22T20:56:55.149691+00:00", - "domain": "https://pypi.org/pypi/{name}/json", - "latest_datetime": "2024-02-22T20:56:55.149691+00:00", - "latest_version": "5.2.0", - "name": "stevedore", - "version": "5.2.0" - }, "syrupy": { "datetime": "2024-02-07T05:58:03.481215+00:00", "domain": "https://pypi.org/pypi/{name}/json", diff --git a/calcipy/tasks/all_tasks.py b/calcipy/tasks/all_tasks.py index e2561c24..75e5449b 100644 --- a/calcipy/tasks/all_tasks.py +++ b/calcipy/tasks/all_tasks.py @@ -80,7 +80,6 @@ def with_progress(items: Any, offset: int = 0) -> TaskList: types.basedpyright, nox.noxfile.with_kwargs(session='tests'), # pyright: ignore[reportFunctionMemberAccess] lint.pre_commit.with_kwargs(no_update=True), # pyright: ignore[reportFunctionMemberAccess] - lint.security, tags.collect_code_tags, cl.write, pack.lock, diff --git a/calcipy/tasks/lint.py b/calcipy/tasks/lint.py index 83a64d1a..0dab053d 100644 --- a/calcipy/tasks/lint.py +++ b/calcipy/tasks/lint.py @@ -5,7 +5,6 @@ from beartype import beartype from beartype.typing import Optional from corallium.file_helpers import read_package_name -from corallium.log import logger from invoke.context import Context from ..cli import task @@ -79,18 +78,6 @@ def pylint(ctx: Context, *, report: bool = False) -> None: _inner_task(ctx, command='pylint', cli_args=cli_args) -# ============================================================================== -# Security - - -@task() -def security(ctx: Context) -> None: - """Attempt to identify possible security vulnerabilities.""" - logger.warning('Note: Selectively override bandit with "# nosec"', is_header=True) - pkg_name = read_package_name() - run(ctx, f'{python_dir()}/bandit --recursive {pkg_name} -s B101') - - # ============================================================================== # Pre-Commit diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 2beb229a..6e36a0e2 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -1,5 +1,10 @@ ## Unreleased +### Feat + +- remove bandit/security task +- remove flake8 + ### Fix - remove semgrep diff --git a/docs/docs/DEVELOPER_GUIDE.md b/docs/docs/DEVELOPER_GUIDE.md index 3c06f6d8..787723fa 100644 --- a/docs/docs/DEVELOPER_GUIDE.md +++ b/docs/docs/DEVELOPER_GUIDE.md @@ -73,14 +73,14 @@ poetry config pypi-token.pypi ... | `calcipy/tasks/defaults.py` | 20 | 0 | 0 | 89.3% | | `calcipy/tasks/doc.py` | 45 | 0 | 8 | 90.5% | | `calcipy/tasks/executable_utils.py` | 27 | 0 | 0 | 87.2% | -| `calcipy/tasks/lint.py` | 51 | 1 | 0 | 83.5% | +| `calcipy/tasks/lint.py` | 45 | 1 | 0 | 83.1% | | `calcipy/tasks/nox.py` | 8 | 0 | 0 | 100.0% | | `calcipy/tasks/pack.py` | 42 | 10 | 0 | 65.6% | | `calcipy/tasks/stale.py` | 9 | 1 | 0 | 90.9% | | `calcipy/tasks/tags.py` | 18 | 1 | 0 | 91.7% | | `calcipy/tasks/test.py` | 45 | 1 | 2 | 89.2% | | `calcipy/tasks/types.py` | 20 | 0 | 0 | 89.3% | -| **Totals** | 1024 | 67 | 262 | 87.1% | +| **Totals** | 1018 | 67 | 262 | 87.1% | Generated on: 2024-05-29 diff --git a/poetry.lock b/poetry.lock index b903e55c..33165d86 100644 --- a/poetry.lock +++ b/poetry.lock @@ -128,30 +128,6 @@ files = [ [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] -[[package]] -name = "bandit" -version = "1.7.8" -description = "Security oriented static analyser for python code." -optional = true -python-versions = ">=3.8" -files = [ - {file = "bandit-1.7.8-py3-none-any.whl", hash = "sha256:509f7af645bc0cd8fd4587abc1a038fc795636671ee8204d502b933aee44f381"}, - {file = "bandit-1.7.8.tar.gz", hash = "sha256:36de50f720856ab24a24dbaa5fee2c66050ed97c1477e0a1159deab1775eab6b"}, -] - -[package.dependencies] -colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} -PyYAML = ">=5.3.1" -rich = "*" -stevedore = ">=1.20.0" - -[package.extras] -baseline = ["GitPython (>=3.1.30)"] -sarif = ["jschema-to-python (>=1.2.3)", "sarif-om (>=1.0.4)"] -test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)"] -toml = ["tomli (>=1.1.0)"] -yaml = ["PyYAML"] - [[package]] name = "basedpyright" version = "1.12.4" @@ -1576,17 +1552,6 @@ files = [ {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] -[[package]] -name = "pbr" -version = "6.0.0" -description = "Python Build Reasonableness" -optional = true -python-versions = ">=2.6" -files = [ - {file = "pbr-6.0.0-py2.py3-none-any.whl", hash = "sha256:4a7317d5e3b17a3dccb6a8cfe67dab65b20551404c52c8ed41279fa4f0cb4cda"}, - {file = "pbr-6.0.0.tar.gz", hash = "sha256:d1377122a5a00e2f940ee482999518efe16d745d423a670c27773dfbc3c9a7d9"}, -] - [[package]] name = "pip" version = "24.0" @@ -2339,20 +2304,6 @@ files = [ {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, ] -[[package]] -name = "stevedore" -version = "5.2.0" -description = "Manage dynamic plugins for Python applications" -optional = true -python-versions = ">=3.8" -files = [ - {file = "stevedore-5.2.0-py3-none-any.whl", hash = "sha256:1c15d95766ca0569cad14cb6272d4d31dae66b011a929d7c18219c176ea1b5c9"}, - {file = "stevedore-5.2.0.tar.gz", hash = "sha256:46b93ca40e1114cea93d738a6c1e365396981bb6bb78c27045b7587c9473544d"}, -] - -[package.dependencies] -pbr = ">=2.0.0,<2.1.0 || >2.1.0" - [[package]] name = "syrupy" version = "4.6.1" @@ -2842,7 +2793,7 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more [extras] ddict = ["python-box"] doc = ["commitizen", "mkdocs", "mkdocs-build-plantuml-plugin", "mkdocs-gen-files", "mkdocs-git-revision-date-localized-plugin", "mkdocs-include-markdown-plugin", "mkdocs-literate-nav", "mkdocs-material", "mkdocs-section-index", "mkdocstrings", "pandas", "pylint", "pymdown-extensions", "pyyaml", "transitions"] -lint = ["autopep8", "bandit", "pip-check", "ruff"] +lint = ["autopep8", "pip-check", "ruff"] nox = ["nox-poetry", "virtualenv"] pylint = ["pylint"] stale = ["arrow", "bidict", "httpx", "pyrate_limiter"] @@ -2853,4 +2804,4 @@ types = ["basedpyright", "mypy"] [metadata] lock-version = "2.0" python-versions = "^3.9.13" -content-hash = "7f5a59ac72ddbbba202e29c9ddf77f9c91beef883856db66a6411afaa52e681b" +content-hash = "24e2ad98b562101bfaf07f42d2ad340d2b373722a4974eb094cf6927bfefe473" diff --git a/pyproject.toml b/pyproject.toml index 1d026e3c..231d8803 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,6 @@ version = "2.1.0" python = "^3.9.13" arrow = {optional = true, version = ">=1.2.3"} # tags autopep8 = {optional = true, version = ">=2.0.1"} # lint -bandit = {optional = true, version = ">=1.7.4"} # lint basedpyright = {optional = true, version = ">=1.6.0"} # types beartype = ">=0.18.2" bidict = {optional = true, version = ">=0.22.1"} # stale @@ -94,7 +93,6 @@ doc = [ ] lint = [ "autopep8", - "bandit", "pip-check", "ruff", ] diff --git a/tests/tasks/test_lint.py b/tests/tasks/test_lint.py index 12c5a02b..24b4fe58 100644 --- a/tests/tasks/test_lint.py +++ b/tests/tasks/test_lint.py @@ -2,8 +2,8 @@ import pytest -from calcipy.tasks.executable_utils import python_dir, python_m -from calcipy.tasks.lint import autopep8, check, fix, pre_commit, pylint, security, watch +from calcipy.tasks.executable_utils import python_m +from calcipy.tasks.lint import autopep8, check, fix, pre_commit, pylint, watch @pytest.mark.parametrize( @@ -16,9 +16,6 @@ (fix, {}, [f'{python_m()} ruff check ./calcipy ./tests --fix']), (watch, {}, [f'{python_m()} ruff check ./calcipy ./tests --watch --show-source']), (pylint, {}, [f'{python_m()} pylint ./calcipy ./tests']), - (security, {}, [ - f'{python_dir()}/bandit --recursive calcipy -s B101', - ]), (pre_commit, {}, [ call('which pre-commit', warn=True, hide=True), 'pre-commit install',