-
Notifications
You must be signed in to change notification settings - Fork 0
Pilot solution. #1
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
miroslavpojer
merged 30 commits into
master
from
feature/add-logic-or-alter-to-issue-sync
Feb 18, 2026
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
802228e
Inital data population. Development wil follow
miroslavpojer 630087b
Improved repo README. Introduced draft regime for promoting alerts.
miroslavpojer 2456e4d
security: make promote_alerts alert-hash-only + update labels and dry…
miroslavpojer a06dadf
Clean up of code after introduced changes.
miroslavpojer 0e8582f
Developer parents support.
miroslavpojer 61b6ba5
feat: enhance issue synchronization with parent-child linking and ver…
miroslavpojer 5807c2c
feat: add run-all.sh script to streamline alert collection and issue …
miroslavpojer 3240e56
feat: add epic label to parent issue creation for better categorization
miroslavpojer 80ee7a0
feat: enhance issue body templates and metadata handling for security…
miroslavpojer 4f6a71c
feat: add parent issue lifecycle event handling and alert state filte…
miroslavpojer e33701f
feat: enhance issue body templates and add logic to reopen parent iss…
miroslavpojer c89da2b
feat: remove obsolete security event processing scripts and add logic…
miroslavpojer b76046d
feat: add license headers to security scripts and workflows
miroslavpojer 6daf2b7
feat: mark security metric scripts as deprecated with guidance for up…
miroslavpojer 4665122
feat: enhance issue synchronization and add Teams notification integr…
miroslavpojer e4a8d20
feat: add label verification script and enhance run-all.sh with new o…
miroslavpojer 607e731
feat: update README with new sections and enhance workflow for removi…
miroslavpojer c5a4768
feat: add Aquasec Night Scan workflow and update README with new sect…
miroslavpojer 3c1f47e
feat: replace Aquasec Night Scan workflow with Aquasec Scan and updat…
miroslavpojer 8286253
feat: enhance issue label removal workflow with improved logging and …
miroslavpojer 87145b8
feat: update workflow dependencies and concurrency group for Aquasec …
miroslavpojer 4523867
feat: update label casing in workflows and scripts, renamed run-all.s…
miroslavpojer e57356e
feat: add TODO comment to pin specific SHA for Aquasec scan workflow
miroslavpojer 168c6f7
feat: update script reference in Aquasec scan workflow to sync_securi…
miroslavpojer 7f411e7
feat: rename check_labels.py to check_labels.sh and update references…
miroslavpojer 9401187
feat: remove redundant exit statement from sync_security_alerts.sh
miroslavpojer 0060474
feat: unify repo argument format in sync scripts and update README re…
miroslavpojer 372ba56
feat: rename security-alerts-to-issues job and update sync_security_a…
miroslavpojer d7f83d0
feat: update SKIP_LABEL_CHECK and FORCE variable assignments for cons…
miroslavpojer f6614b2
feat: simplify repository handling in collect_alert.sh by removing OW…
miroslavpojer 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,105 @@ | ||
| # | ||
| # Copyright 2026 ABSA Group Limited | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Reusable workflow – Aquasec Scan + Security Alerts to Issues. | ||
| # | ||
| # Called from application repositories via workflow_call. | ||
| # The caller triggers on schedule / workflow_dispatch and passes the required secrets. | ||
|
|
||
| name: Aquasec Scan | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| verbose-logging: | ||
| description: 'Enable verbose logging for AquaSec scan' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| secrets: | ||
| AQUA_KEY: | ||
| required: true | ||
| AQUA_SECRET: | ||
| required: true | ||
| AQUA_GROUP_ID: | ||
| required: true | ||
| AQUA_REPOSITORY_ID: | ||
| required: true | ||
| TEAMS_WEBHOOK_URL: | ||
| required: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| issues: write | ||
| security-events: write | ||
|
|
||
| jobs: | ||
| aquasec-scan: | ||
| name: Aquasec Scan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Fetch AquaSec Scan Results | ||
| id: aquasec | ||
| uses: AbsaOSS/aquasec-scan-results@master # TODO - pin to specific sha when possible | ||
| with: | ||
| aqua-key: ${{ secrets.AQUA_KEY }} | ||
| aqua-secret: ${{ secrets.AQUA_SECRET }} | ||
| group-id: ${{ secrets.AQUA_GROUP_ID }} | ||
| repository-id: ${{ secrets.AQUA_REPOSITORY_ID }} | ||
| verbose-logging: ${{ inputs.verbose-logging }} | ||
|
|
||
| - name: Upload Scan Results to GitHub Security | ||
| uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 | ||
| with: | ||
| sarif_file: ${{ steps.aquasec.outputs.aquasec-sarif-file }} | ||
| category: aquasec | ||
|
|
||
| sync-alerts-to-issues: | ||
| name: Security Alerts to Issues | ||
| needs: aquasec-scan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout security scripts | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | ||
| with: | ||
| repository: AbsaOSS/organizational-workflows | ||
| ref: master | ||
| path: org-workflows | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 | ||
| with: | ||
| python-version: '3.14' | ||
| cache: 'pip' | ||
| cache-dependency-path: org-workflows/github/security/requirements.txt | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install -r org-workflows/github/security/requirements.txt | ||
|
|
||
| - name: Run alert-to-issue sync | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }} | ||
| run: | | ||
| org-workflows/github/security/sync_security_alerts.sh |
73 changes: 73 additions & 0 deletions
73
.github/workflows/remove-adept-to-close-on-issue-close.yml
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,73 @@ | ||
| # | ||
| # Copyright 2026 ABSA Group Limited | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Reusable workflow – Remove sec:adept-to-close label when an issue is closed. | ||
| # | ||
| # Called from application repositories via workflow_call. | ||
| # The caller must trigger on `issues: [closed]`. | ||
| # Note: for `workflow_call`, the called workflow receives the same event payload as the caller, | ||
| # so `context.payload` (aka `github.event`) is populated without needing to "forward" it via inputs. | ||
|
|
||
| name: Remove sec:adept-to-close on close | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| cleanup-label: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Remove label when conditions match | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd | ||
| with: | ||
| script: | | ||
| const issue = context.payload.issue; | ||
Zejnilovic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // Safety: ignore PRs (they can appear as issues in GitHub UI) | ||
| if (issue.pull_request) { | ||
| core.info('Skipping: payload refers to a pull request, not an issue.'); | ||
| return; | ||
| } | ||
|
|
||
| const labels = (issue.labels ?? []) | ||
| .map(l => (typeof l === 'string' ? l : l?.name)) | ||
| .filter(Boolean); | ||
|
|
||
| const hasScopeSecurity = labels.includes('scope:security'); | ||
| const hasTechDebt = labels.includes('type:tech-debt'); | ||
| const hasAdeptToClose = labels.includes('sec:adept-to-close'); | ||
|
|
||
| if (!hasScopeSecurity || !hasTechDebt) { | ||
| core.info( | ||
| `Skipping: required labels missing (scope:security=${hasScopeSecurity}, type:tech-debt=${hasTechDebt}).` | ||
| ); | ||
| return; | ||
Zejnilovic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| if (!hasAdeptToClose) { | ||
| core.info('No-op: label sec:adept-to-close is not present on the issue.'); | ||
| return; | ||
| } | ||
|
|
||
| await github.rest.issues.removeLabel({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: issue.number, | ||
| name: 'sec:adept-to-close', | ||
| }); | ||
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,11 @@ | ||
| .DS_Store | ||
| github/security/__pycache__/ | ||
| **/__pycache__/ | ||
| *.pyc | ||
| /.idea | ||
| target | ||
| .bsp | ||
| .idea | ||
| *.iml | ||
| .vscode | ||
| github/security/alerts*.json |
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 |
|---|---|---|
| @@ -1,2 +1,17 @@ | ||
| # organizational-workflows | ||
| Public repository standards toolkit: templates, labels, policy examples, and optional automation for GitHub repos. | ||
| # Organizational workflows | ||
|
|
||
| This repository is a small toolkit of repeatable, organization-level workflows for GitHub repositories. | ||
| Each workflow lives next to its automation code under `github/` and is documented in a folder-level README. | ||
|
|
||
| ## Workflows | ||
|
|
||
| ### Security automation (Code Scanning → Issues) | ||
|
|
||
| Turns GitHub Code Scanning alerts (SARIF-based tools such as AquaSec) into a managed GitHub Issues backlog. | ||
| Issues become the system of record for ownership, postponement, lifecycle events, and reporting. | ||
|
|
||
| - Documentation and usage: [github/security/README.md](github/security/README.md) | ||
|
|
||
| ## Next | ||
|
|
||
| More workflows will be added over time, each with its own folder and README under `github/`. |
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.
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.
We use capital first letters in the workflow naming. I would also add a label in the name for better understanding.
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.
Addressed in 4523867.
decision: we will use only lower case labels.