-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: araya <[email protected]> Co-authored-by: Brax Excell <[email protected]>
- Loading branch information
1 parent
154d104
commit 8dd8c5a
Showing
4 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Sync Security Hub findings and Jira issues | ||
name: Scan and Open Jira Tickets (AWS Security Hub) | ||
|
||
on: | ||
workflow_dispatch: # for testing and manual runs | ||
|
@@ -23,12 +23,11 @@ jobs: | |
- name: Sync Security Hub and Jira | ||
uses: Enterprise-CMCS/[email protected] | ||
with: | ||
jira-token: ${{ secrets.JIRA_SERVICE_USER_TOKEN }} | ||
jira-username: ${{ secrets.JIRA_SERVICE_USERNAME }} | ||
jira-host: qmacbis.atlassian.net | ||
jira-project-key: MDCT | ||
jira-epic-key: MDCT-2280 | ||
jira-username: "mdct_github_service_account" | ||
jira-token: ${{ secrets.JIRA_ENT_USER_TOKEN }} | ||
jira-host: jiraent.cms.gov | ||
jira-project-key: CMDCT | ||
jira-ignore-statuses: Done, Closed, Canceled | ||
jira-custom-fields: '{ "customfield_14154" : [{"id": "16955", "value": "CARTS"}] }' | ||
jira-custom-fields: '{ "customfield_10100": "CMDCT-2280", "customfield_26700" : [{"id": "40101", "value": "CARTS"}] }' | ||
aws-severities: CRITICAL, HIGH, MEDIUM | ||
assign-jira-ticket-to: ${{ secrets.ACCOUNT_ID_REHMAN }} | ||
assign-jira-ticket-to: "MWTW" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Snyk Scan and Report | ||
name: Scan and Open Jira Tickets (Snyk) | ||
|
||
on: | ||
pull_request: | ||
|
@@ -14,7 +14,6 @@ jobs: | |
name: Snyk Run (for PR and push) | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
@@ -42,17 +41,17 @@ jobs: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
|
||
- name: use the custom github action to parse Snyk output | ||
uses: Enterprise-CMCS/[email protected].0 | ||
uses: Enterprise-CMCS/[email protected].4 | ||
with: | ||
jira-username: ${{ secrets.JIRA_SERVICE_USERNAME }} | ||
jira-token: ${{ secrets.JIRA_SERVICE_USER_TOKEN }} | ||
jira-host: "qmacbis.atlassian.net" | ||
jira-project-key: "MDCT" | ||
jira-username: "mdct_github_service_account" | ||
jira-token: ${{ secrets.JIRA_ENT_USER_TOKEN }} | ||
jira-host: "jiraent.cms.gov" | ||
jira-project-key: "CMDCT" | ||
jira-issue-type: "Task" | ||
jira-custom-field-key-value: '{ "customfield_10007" : "MDCT-2280", "customfield_14154" : [{"id": "16955", "value": "CARTS"}] }' | ||
jira-custom-field-key-value: '{ "customfield_10100": "CMDCT-2280", "customfield_26700" : [{"id": "40101", "value": "CARTS"}] }' | ||
jira-labels: "CARTS,snyk" | ||
jira-title-prefix: "[CARTS] - Snyk :" | ||
is_jira_enterprise: false | ||
assign-jira-ticket-to: ${{ secrets.ACCOUNT_ID_REHMAN }} | ||
is_jira_enterprise: true | ||
assign-jira-ticket-to: "MWTW" | ||
scan-output-path: "snyk_output.txt" | ||
scan-type: "snyk" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Adapted from https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions | ||
name: Snyk auto-merge | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'mdct-github-service-account' }} | ||
steps: | ||
- name: Snyk Gather Metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
- name: Approve a PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Enable auto-merge for Snyk PRs | ||
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major'}} | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |