Skip to content
Closed
Changes from all 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
25 changes: 25 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 🛡️ Scans de Segurança

on:
push:
branches: ['*']
pull_request:
branches: ['*']
Comment on lines +5 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Broaden the branch filters to include slash-containing branch names.

Using branches: ['*'] limits the workflow to branches without /, so pushes like feature/foo will never trigger the security scan. Please switch to ['**'] (or drop the filter entirely) for both push and pull_request so the workflow still runs on standard feature branches.

   push:
-    branches: ['*']
+    branches: ['**']
   pull_request:
-    branches: ['*']
+    branches: ['**']
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
branches: ['*']
pull_request:
branches: ['*']
push:
branches: ['**']
pull_request:
branches: ['**']
🤖 Prompt for AI Agents
In .github/workflows/security.yml around lines 5 to 7, the branch filters use
branches: ['*'] which does not match branch names containing slashes (e.g.
feature/foo); update both the push and pull_request branch filters to use
branches: ['**'] (or remove the filters entirely) so the workflow triggers on
slash-containing branches like feature/* and other nested names.

workflow_dispatch:
inputs:
target:
description: "URL alvo do DAST (ex.: https://google.com)"
required: false
default: ""

jobs:
Seguranca:
uses: ditointernet/dito-security/.github/workflows/appsec.yml@v1
with:
target: ${{ github.event.inputs.target != '' && github.event.inputs.target || vars.DAST_TARGET }}
secrets:
DOJO_TOKEN: ${{ secrets.DOJO_TOKEN }}
DOJO_USER: ${{ secrets.DOJO_USER }}
DOJO_PASS: ${{ secrets.DOJO_PASS }}
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
DPBOT_TOKEN: ${{ secrets.DPBOT_TOKEN }}