Skip to content
Merged
Show file tree
Hide file tree
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 Feb 10, 2026
630087b
Improved repo README. Introduced draft regime for promoting alerts.
miroslavpojer Feb 10, 2026
2456e4d
security: make promote_alerts alert-hash-only + update labels and dry…
miroslavpojer Feb 10, 2026
a06dadf
Clean up of code after introduced changes.
miroslavpojer Feb 10, 2026
0e8582f
Developer parents support.
miroslavpojer Feb 11, 2026
61b6ba5
feat: enhance issue synchronization with parent-child linking and ver…
miroslavpojer Feb 11, 2026
5807c2c
feat: add run-all.sh script to streamline alert collection and issue …
miroslavpojer Feb 11, 2026
3240e56
feat: add epic label to parent issue creation for better categorization
miroslavpojer Feb 11, 2026
80ee7a0
feat: enhance issue body templates and metadata handling for security…
miroslavpojer Feb 11, 2026
4f6a71c
feat: add parent issue lifecycle event handling and alert state filte…
miroslavpojer Feb 11, 2026
e33701f
feat: enhance issue body templates and add logic to reopen parent iss…
miroslavpojer Feb 11, 2026
c89da2b
feat: remove obsolete security event processing scripts and add logic…
miroslavpojer Feb 12, 2026
b76046d
feat: add license headers to security scripts and workflows
miroslavpojer Feb 12, 2026
6daf2b7
feat: mark security metric scripts as deprecated with guidance for up…
miroslavpojer Feb 12, 2026
4665122
feat: enhance issue synchronization and add Teams notification integr…
miroslavpojer Feb 12, 2026
e4a8d20
feat: add label verification script and enhance run-all.sh with new o…
miroslavpojer Feb 12, 2026
607e731
feat: update README with new sections and enhance workflow for removi…
miroslavpojer Feb 12, 2026
c5a4768
feat: add Aquasec Night Scan workflow and update README with new sect…
miroslavpojer Feb 12, 2026
3c1f47e
feat: replace Aquasec Night Scan workflow with Aquasec Scan and updat…
miroslavpojer Feb 16, 2026
8286253
feat: enhance issue label removal workflow with improved logging and …
miroslavpojer Feb 16, 2026
87145b8
feat: update workflow dependencies and concurrency group for Aquasec …
miroslavpojer Feb 16, 2026
4523867
feat: update label casing in workflows and scripts, renamed run-all.s…
miroslavpojer Feb 16, 2026
e57356e
feat: add TODO comment to pin specific SHA for Aquasec scan workflow
miroslavpojer Feb 16, 2026
168c6f7
feat: update script reference in Aquasec scan workflow to sync_securi…
miroslavpojer Feb 16, 2026
7f411e7
feat: rename check_labels.py to check_labels.sh and update references…
miroslavpojer Feb 17, 2026
9401187
feat: remove redundant exit statement from sync_security_alerts.sh
miroslavpojer Feb 17, 2026
0060474
feat: unify repo argument format in sync scripts and update README re…
miroslavpojer Feb 17, 2026
372ba56
feat: rename security-alerts-to-issues job and update sync_security_a…
miroslavpojer Feb 17, 2026
d7f83d0
feat: update SKIP_LABEL_CHECK and FORCE variable assignments for cons…
miroslavpojer Feb 18, 2026
f6614b2
feat: simplify repository handling in collect_alert.sh by removing OW…
miroslavpojer Feb 18, 2026
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
105 changes: 105 additions & 0 deletions .github/workflows/aquasec-scan.yml
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 .github/workflows/remove-adept-to-close-on-issue-close.yml
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
Copy link
Collaborator

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.

Copy link
Contributor Author

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.


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;

// 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;
}

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',
});
11 changes: 11 additions & 0 deletions .gitignore
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
19 changes: 17 additions & 2 deletions README.md
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/`.
Loading