From 66edb771130851f9d744c78981cbb563b8c11e76 Mon Sep 17 00:00:00 2001 From: charlesgauthereau Date: Thu, 28 Aug 2025 09:16:54 +0200 Subject: [PATCH] Working on the retention system. --- .github/workflows/security.yml | 38 ++++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/security.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 00000000..4cd95793 --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,38 @@ +name: Security Checks +on: + pull_request: + push: + branches: [ main ] + +jobs: + sca-deps: # Dependency & container scan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: aquasecurity/trivy-action@0.20.0 + with: + scan-type: 'fs' + format: 'table' + severity: 'CRITICAL,HIGH' + ignore-unfixed: true + + sast-semgrep: # Static code analysis + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: returntocorp/semgrep-action@v1 + with: + config: >- + p/owasp-top-ten + p/secrets + p/javascript + generateSarif: true + - uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: semgrep.sarif + + secrets-gitleaks: # Secrets exposure + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: gitleaks/gitleaks-action@v2 \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..8a4445d0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.24.2 + hooks: + - id: gitleaks \ No newline at end of file