mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-29 23:04:23 +00:00
* feat(Backend): PRWLR-4992 add Scan db model * feat(API): PRWLR-4002 add viewset and required tools for /scans endpoint * feat(API): PRWLR-4002 improve /scans filters * feat(API): PRWLR-4002 add relationships links * feat(API): PRWLR-4002 implement POST /scan custom logic * fix(API): PRWLR-4002 fix Scan.type keyword usage * feat(API): PRWLR-4002 implement PATCH /scans * feat(API): PRWLR-4002 refactor serializers for write operations * fix(API): PRWLR-4002 fix providers on ScanSerializer * test(API): PRWLR-4002 add unit tests for /scans * feat(Backend, Test): PRWLR-4002 refactor routing and unit tests db connections * build(CI): PRWLR-4002 update CI env vars for postgres * fix(Tests): PRWLR-4002 fix close_db_connections fixture * feat(Backend, API): PRWLR-4002 apply requested changes to Scan model and filters * chore(Tests): PRWLR-4002 rename pytest fixtures * feat(Backend): PRWLR-4002 remove unique constraint from Scan model * fix(Backend, Tests): PRWLR-4002 fix db routing and migration mechanism for tests * chore(deps): PRWLR-4002 add uuid6 to poetry deps * chore(Backend): PRWLR-4002 refactor filter methods * fix(Tests): PRWLR-4002 fix wrong postgres credentials for testing * feat(API): PRWLR-4002 implement merging mechanism for Scans.scanner_args * feat(API): PRWLR-4002 implement merging mechanism for Scans.scanner_args * feat(Backend): PRWLR-4002 add indexes to Scan model * feat(Backend): PRWLR-4002 remove id index from Scan model (redundant) * feat(API): PRWLR-4002 add datetime fields to Scan serializer
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
repos:
|
|
## GENERAL
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: check-merge-conflict
|
|
- id: check-yaml
|
|
args: ["--unsafe"]
|
|
- id: check-json
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
- id: no-commit-to-branch
|
|
- id: pretty-format-json
|
|
args: ["--autofix", --no-sort-keys, --no-ensure-ascii]
|
|
|
|
## TOML
|
|
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
|
rev: v2.13.0
|
|
hooks:
|
|
- id: pretty-format-toml
|
|
args: [--autofix]
|
|
files: pyproject.toml
|
|
|
|
## BASH
|
|
- repo: https://github.com/koalaman/shellcheck-precommit
|
|
rev: v0.10.0
|
|
hooks:
|
|
- id: shellcheck
|
|
exclude: contrib
|
|
## PYTHON
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
# Ruff version.
|
|
rev: v0.5.0
|
|
hooks:
|
|
# Run the linter.
|
|
- id: ruff
|
|
args: [ --fix ]
|
|
# Run the formatter.
|
|
- id: ruff-format
|
|
|
|
- repo: https://github.com/python-poetry/poetry
|
|
rev: 1.8.0
|
|
hooks:
|
|
- id: poetry-check
|
|
args: ["--directory=src"]
|
|
- id: poetry-lock
|
|
args: ["--no-update", "--directory=src"]
|
|
|
|
- repo: https://github.com/hadolint/hadolint
|
|
rev: v2.13.0-beta
|
|
hooks:
|
|
- id: hadolint
|
|
args: ["--ignore=DL3013", "Dockerfile"]
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: pylint
|
|
name: pylint
|
|
entry: bash -c 'poetry run pylint --disable=W,C,R,E -j 0 -rn -sn src/'
|
|
language: system
|
|
files: '.*\.py'
|
|
|
|
- id: trufflehog
|
|
name: TruffleHog
|
|
description: Detect secrets in your data.
|
|
entry: bash -c 'trufflehog --no-update git file://. --only-verified --fail'
|
|
# For running trufflehog in docker, use the following entry instead:
|
|
# entry: bash -c 'docker run -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --only-verified --fail'
|
|
language: system
|
|
stages: ["commit", "push"]
|
|
|
|
- id: bandit
|
|
name: bandit
|
|
description: "Bandit is a tool for finding common security issues in Python code"
|
|
entry: bash -c 'poetry run bandit -q -lll -x '*_test.py,./contrib/,./.venv/' -r .'
|
|
language: system
|
|
files: '.*\.py'
|
|
|
|
- id: safety
|
|
name: safety
|
|
description: "Safety is a tool that checks your installed dependencies for known security vulnerabilities"
|
|
entry: bash -c 'poetry run safety check --ignore 70612'
|
|
language: system
|
|
|
|
- id: vulture
|
|
name: vulture
|
|
description: "Vulture finds unused code in Python programs."
|
|
entry: bash -c 'poetry run vulture --exclude "contrib,.venv,tests,conftest.py" --min-confidence 100 .'
|
|
language: system
|
|
files: '.*\.py'
|