-
-
Notifications
You must be signed in to change notification settings - Fork 122
Create security.yml #692
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
Create security.yml #692
Conversation
WalkthroughAdds a new GitHub Actions workflow (.github/workflows/security.yml) named "🛡️ Scans de Segurança" that runs on push, pull_request, and workflow_dispatch. It invokes a reusable workflow from ditointernet/dito-security/appsec.yml@v1, mapping a target input (fallback to DAST_TARGET) and forwarding five specified secrets. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant WF as security.yml (this repo)
participant RW as dito-security/appsec.yml@v1
Dev->>GH: push / pull_request / workflow_dispatch
GH->>WF: Start "🛡️ Scans de Segurança"
note over WF: Resolve target = input.target<br/>or env.DAST_TARGET
WF->>RW: Reusable workflow call<br/>with target + secrets
RW-->>WF: Execute security scans (AppSec/DAST/etc.)
WF-->>GH: Job "Seguranca" result
GH-->>Dev: Workflow status and outputs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
branches: ['*'] | ||
pull_request: | ||
branches: ['*'] |
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.
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.
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.
This is spam |
Summary by CodeRabbit