Add secret scanning, Dockerfile lint, ruff lint/format gate, coverage gate, and automatic CVE remediation PRs

- gitleaks (via docker cp, dockerignore-agnostic) and hadolint scan every push/PR
- new ruff lint stage (ruff.toml pins known-first-party for host/container
  consistency; B905 in env_config.py's zip() left un-fixed — app-logic change,
  see feedback-no-app-logic-changes)
- pytest --cov-fail-under=75 gate on the test stage
- scheduled Trivy critical failures now attempt an apk upgrade rebuild and open a PR
  if it clears the finding, instead of just failing red
- ruff --fix/--format applied to existing code to start the gate clean
This commit is contained in:
Djeex
2026-08-26 14:49:38 +02:00
parent d6cf5bb41f
commit 30c9b83c17
10 changed files with 316 additions and 132 deletions
+8 -1
View File
@@ -11,13 +11,20 @@ RUN pip install --no-cache-dir -r requirements.txt
FROM base AS test
RUN pip install --no-cache-dir pytest==9.1.1
RUN pip install --no-cache-dir pytest==9.1.1 pytest-cov==7.1.0
COPY pytest.ini /app/pytest.ini
COPY /tests/ /app/tests/
CMD ["pytest", "-v"]
FROM base AS lint
RUN pip install --no-cache-dir ruff==0.16.4
COPY ruff.toml /app/ruff.toml
COPY /tests/ /app/tests/
RUN ruff check . && ruff format --check .
FROM base
RUN addgroup -g 911 nvbot && adduser -D -u 911 -G nvbot nvbot