Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ permissions:
contents: read
security-events: write
packages: write # útil si luego publicas en GHCR
discussions: write
Comment thread
kerobero marked this conversation as resolved.
pull-requests: write
Comment thread
kerobero marked this conversation as resolved.

Comment thread
kerobero marked this conversation as resolved.
concurrency:
group: devsecops-${{ github.ref }}
Expand All @@ -33,9 +35,10 @@ jobs:
runs-on: self-hosted
steps:
- name: Clean gitleaks
run: rm /tmp/gitleaks.tmp
run: rm -f /tmp/gitleaks.tmp
Comment thread
kerobero marked this conversation as resolved.
- uses: actions/checkout@v4
Comment thread
kerobero marked this conversation as resolved.
with: { fetch-depth: 0 } # para análisis que miran historial
with:
Comment thread
kerobero marked this conversation as resolved.
fetch-depth: 0 # para análisis que miran historial
Comment thread
kerobero marked this conversation as resolved.
- name: Gitleaks
Comment thread
kerobero marked this conversation as resolved.
uses: gitleaks/gitleaks-action@v2
env:
Expand All @@ -48,7 +51,7 @@ jobs:
needs: [secrets]
steps:
- uses: actions/checkout@v4
- name: Semgrep (bloqueante)
- name: Semgrep (no bloqueante)
Comment thread
kerobero marked this conversation as resolved.
run: |
Comment thread
kerobero marked this conversation as resolved.
docker run --rm -v "$PWD:/src" returntocorp/semgrep:latest \
semgrep scan --config p/ci --config .semgrep
Expand Down
40 changes: 40 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
title = "gitleaks config"

[extend]
useDefault = true

[[rules]]
description = "AWS Access Key"
id = "aws-access-key"
regex = '''AKIA[0-9A-Z]{16}'''
tags = ["key", "AWS"]

[[rules]]
description = "AWS Secret Key"
id = "aws-secret-key"
regex = '''([^A-Za-z0-9/+=]{0,20}[A-Za-z0-9/+=]{40})?'''
tags = ["key", "AWS"]

[[rules]]
description = "Generic API Key"
id = "generic-api-key"
regex = '''key|token|secret|password.*=.*['\"][0-9a-zA-Z]{20,45}['\"]'''
tags = ["key", "API"]

[[rules]]
description = "Private Key"
id = "private-key"
regex = '''-----BEGIN (RSA|DSA|EC|OPENSSH|PGP) PRIVATE KEY-----'''
tags = ["key", "private"]

[[rules]]
description = "Password in URL"
id = "password-in-url"
regex = '''[a-zA-Z]{3,10}://[^/\\s:@]{3,20}:[^/\\s:@]{3,20}@.{1,100}["'\s]'''
tags = ["password", "URL"]

[[rules]]
description = "Slack Token"
id = "slack-token"
regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
tags = ["key", "Slack"]
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
06a03230fa19739e0ef31b2a68fdd0a45205f919:.github/workflows/main.yml:aws-secret-key:38
Comment thread
kerobero marked this conversation as resolved.
Outdated
Loading