-
Notifications
You must be signed in to change notification settings - Fork 0
feat(security): CodeQL workflow + security alerts setup guide #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: '0 9 * * 1' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| actions: read | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: [javascript-typescript] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| queries: security-extended | ||
|
|
||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v3 | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v3 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||
| # 🛡️ Security Alerts — Configuração Completa | ||||||
|
|
||||||
| Este repo tem 4 camadas de defesa de segurança. As 2 primeiras já estão como código (este PR adiciona a 4ª). As 2 do meio precisam ser ativadas no UI. | ||||||
|
||||||
| Este repo tem 4 camadas de defesa de segurança. As 2 primeiras já estão como código (este PR adiciona a 4ª). As 2 do meio precisam ser ativadas no UI. | |
| Este repo tem 5 camadas de defesa de segurança. As camadas 1, 2 e 4 já estão configuradas como código (este PR adiciona a 4ª). As camadas 3 e 5 precisam ser ativadas no UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O PR descreve que o schedule (cron) "evita gargalo no CI de PRs", mas este workflow também roda em todo
pull_requestcontramain(além depush), o que mantém o custo no CI de PRs. Ou ajuste a descrição/guia para refletir isso, ou altere os triggers (ex.: removerpull_requestou restringir por paths/branches) para alinhar com o objetivo declarado.