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)
- 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:26 +02:00
parent afae89a9f8
commit 5d2a797d46
5 changed files with 136 additions and 22 deletions
+7 -1
View File
@@ -15,9 +15,15 @@ COPY blocklist_scheduler.py entrypoint.sh VERSION ./
RUN chmod +x entrypoint.sh
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 tests/ tests/
COPY pytest.ini .
FROM base AS lint
RUN pip install --no-cache-dir ruff==0.16.4
COPY ruff.toml .
COPY tests/ tests/
RUN ruff check . && ruff format --check .
FROM base
ENTRYPOINT ["./entrypoint.sh"]