ci(forgejo): add CI workflow and fix findings from the first scan #14

Merged
csaeum merged 4 commits from feature/ci-setup into main 2026-11-15 15:07:55 +00:00
Owner

Summary

  • Add .forgejo/workflows/ci.yml with jobs lint (ruff, yamllint, JSON/TOML syntax), abhaengigkeiten and abhaengigkeiten-ner (pip-audit), and sicherheit (Gitleaks, Trivy, Semgrep). Tool versions are pinned, binaries are checked against fixed SHA256 sums.
  • style(leadscraper): apply ruff auto-fixes and formatting so the lint job passes (no functional changes).
  • fix(ner-service): run the container as non-root user and bump Flask to 3.1.3 (Trivy DS-0002, Semgrep missing-user, pip-audit PYSEC-2026-1377 / PYSEC-2026-2151).
  • chore(leadscraper): add a targeted nosemgrep for the intended plain-http call to the NER service inside the private Docker network.

Test plan

  • All CI commands run locally in an isolated venv / container with the pinned versions: ruff, yamllint, pip-audit, Gitleaks, Trivy, Semgrep are clean.
  • ner-service image builds, runs as non-root, /health and /extract-persons answer.
  • Forgejo CI run is green (runner was offline when this was opened).
  • Verify in the CRM demo site with dev mount (search run with limit 1).

🤖 Generated with Claude Code

## Summary - Add `.forgejo/workflows/ci.yml` with jobs `lint` (ruff, yamllint, JSON/TOML syntax), `abhaengigkeiten` and `abhaengigkeiten-ner` (pip-audit), and `sicherheit` (Gitleaks, Trivy, Semgrep). Tool versions are pinned, binaries are checked against fixed SHA256 sums. - `style(leadscraper)`: apply ruff auto-fixes and formatting so the lint job passes (no functional changes). - `fix(ner-service)`: run the container as non-root user and bump Flask to 3.1.3 (Trivy DS-0002, Semgrep missing-user, pip-audit PYSEC-2026-1377 / PYSEC-2026-2151). - `chore(leadscraper)`: add a targeted `nosemgrep` for the intended plain-http call to the NER service inside the private Docker network. ## Test plan - [x] All CI commands run locally in an isolated venv / container with the pinned versions: ruff, yamllint, pip-audit, Gitleaks, Trivy, Semgrep are clean. - [x] ner-service image builds, runs as non-root, `/health` and `/extract-persons` answer. - [ ] Forgejo CI run is green (runner was offline when this was opened). - [ ] Verify in the CRM demo site with dev mount (search run with limit 1). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Apply ruff auto-fixes (UP035, UP017, I001) and ruff format so the
upcoming CI lint job passes. No functional changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add an unprivileged user to the Dockerfile (Trivy DS-0002, Semgrep
missing-user) and update Flask to fix PYSEC-2026-1377 and
PYSEC-2026-2151 reported by pip-audit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The NER service is only reachable inside the private Docker network,
so the plain http:// request is intended. Exempt only this rule on this
line, with the reason next to it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ci(forgejo): add CI workflow
All checks were successful
CI / lint (push) Successful in 55s
CI / abhaengigkeiten (push) Successful in 17s
CI / abhaengigkeiten-ner (push) Successful in 26s
CI / sicherheit (push) Successful in 37s
CI / lint (pull_request) Successful in 6s
CI / abhaengigkeiten (pull_request) Successful in 14s
CI / abhaengigkeiten-ner (pull_request) Successful in 25s
CI / sicherheit (pull_request) Successful in 39s
e1b6ddc7c5
Add the Forgejo runner workflow with lint (ruff, yamllint), dependency
audit (pip-audit for the app and the ner-service) and security scans
(Gitleaks, Trivy, Semgrep) with pinned versions and SHA256 checksums.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
csaeum merged commit 4d2c457934 into main 2026-11-15 15:07:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Frappe-Projekte/LeadScraper-Google!14
No description provided.