-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add --include-files flag for targeted file scanning #46
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
45a0eed
feat: add --include-files flag for targeted file scanning in PR workf…
yiftach-armis d25446e
fix: use cross-platform absolute paths in test
yiftach-armis cfec25b
fix: use local action for testing and prevent command injection
yiftach-armis c750399
fix: build CLI from source for PR testing
yiftach-armis 9f9b9a6
Merge branch 'main' into feature/scan-changed-files
yiftach-armis 61856a6
feat: enhance SARIF output with detailed findings and improve PR comm…
yiftach-armis e207264
fix: add nolint directive for errcheck on pipe close
yiftach-armis a7b2b53
fix: close file immediately in tarGzFiles loop to prevent resource leak
yiftach-armis 53d95e6
fix: address security scan findings
yiftach-armis 788920e
fix: address additional security scan findings
yiftach-armis 6041916
fix: address security scan findings for CI compliance
yiftach-armis 6e10fb2
fix: close pipe writer on context cancellation to prevent test timeout
yiftach-armis 62bcd93
fix: add nolint directive for errcheck on pipe close
yiftach-armis f1b4714
fix: add gosec to nolint directive for pipe close
yiftach-armis 0d545f6
fix: add required permissions for reusable security scan workflow
yiftach-armis b5cc0eb
fix: address remaining security scan findings
yiftach-armis d557b65
fix: use released binary by default for security scans
yiftach-armis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: PR Security Scan | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| actions: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| get-changed-files: | ||
| name: Get Changed Files | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| files: ${{ steps.changed-files.outputs.all_changed_files }} | ||
| any_changed: ${{ steps.changed-files.outputs.any_changed }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Get changed files | ||
| id: changed-files | ||
| uses: tj-actions/changed-files@v46 | ||
| with: | ||
| separator: ',' | ||
| # Exclude test files from security scan - they contain intentional | ||
| # path traversal test data that triggers false positives | ||
| files_ignore: | | ||
| **/*_test.go | ||
| **/testdata/** | ||
|
|
||
| security-scan: | ||
| name: Security Scan | ||
| needs: get-changed-files | ||
| if: needs.get-changed-files.outputs.any_changed == 'true' | ||
| uses: ./.github/workflows/reusable-security-scan.yml | ||
| with: | ||
| scan-type: repo | ||
| fail-on: 'CRITICAL,HIGH' | ||
| include-files: ${{ needs.get-changed-files.outputs.files }} | ||
| build-from-source: false | ||
| secrets: | ||
| api-token: ${{ secrets.ARMIS_API_TOKEN }} | ||
| tenant-id: ${{ secrets.ARMIS_TENANT_ID }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.