Sync Security Hub findings and Jira issues #202
This file contains 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
name: Sync Security Hub findings and Jira issues | |
on: | |
workflow_dispatch: # for testing and manual runs | |
schedule: | |
- cron: '25 1 * * *' # daily at 6:25 am EST | |
permissions: | |
id-token: write | |
jobs: | |
sync: | |
name: Run sync | |
environment: prod | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Get AWS credentials | |
uses: ./.github/actions/get_aws_credentials | |
with: | |
region: ${{ vars.AWS_DEFAULT_REGION }} | |
account-id: ${{ secrets.PROD_AWS_ACCOUNT_ID }} | |
stage-name: prod | |
- name: Sync Security Hub and Jira | |
uses: Enterprise-CMCS/mac-fc-security-hub-visibility@v1.0.3 | |
with: | |
jira-token: ${{ secrets.JIRA_TOKEN }} | |
jira-username: ${{ secrets.JIRA_USERNAME }} | |
jira-host: qmacbis.atlassian.net | |
jira-project-key: MR # add issues to the 'MC-Review' project | |
jira-epic-key: MR-3092 # add issues to the '[Tech Maintenance] Security Hub' epic | |
jira-custom-fields: '{ "customfield_10006": 925 }' # add issues to the 'Tech Maintenance' sprint | |
jira-ignore-statuses: Done | |
aws-region: us-east-1 | |
aws-severities: CRITICAL, HIGH, MEDIUM | |
- name: Alert Slack On Failure | |
uses: rtCamp/action-slack-notify@v2 | |
if: failure() | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_USERNAME: Deploy Alerts | |
SLACK_ICON_EMOJI: ':bell:' | |
SLACK_COLOR: failure | |
SLACK_FOOTER: '' | |
SLACK_MESSAGE: 'Failure syncing Security Hub findings and Jira issues' | |
MSG_MINIMAL: actions url |