Skip to content
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

feat(snyk support): Changes to use Snyk for dependencies, licenses, and code analysis #257

Merged
merged 6 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
80 changes: 0 additions & 80 deletions .github/workflows/codeql.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/dependency-review.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/dependency-update.yml

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
- "!skipci*"

concurrency:
group: ${{ github.ref_name }}-group
group: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}-group

env:
STAGE_NAME: ${{ github.ref_name }}
STAGE_NAME: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}

permissions:
id-token: write
Expand All @@ -32,7 +32,7 @@ jobs:
needs:
- init
environment:
name: ${{ github.ref_name }}
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -46,7 +46,7 @@ jobs:
needs:
- cache
environment:
name: ${{ github.ref_name }}
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
url: ${{ steps.deployment-data.outputs.APPURL }}
outputs:
app-url: ${{ steps.deployment-data.outputs.APPURL }}
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Set Site URL
id: deployment-data
run: |
echo ${{ github.ref_name }}
echo ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
echo "APPURL=$(
aws cloudformation \
--region us-east-1 describe-stacks \
Expand All @@ -92,7 +92,7 @@ jobs:
needs:
- deploy
environment:
name: ${{ github.ref_name }}-kibana
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}-kibana
url: ${{ needs.deploy.outputs.kibana-url }}
steps:
- name: Display Kibana URL
Expand All @@ -104,7 +104,7 @@ jobs:
needs:
- cache
environment:
name: ${{ github.ref_name }}
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
needs:
- deploy
environment:
name: ${{ github.ref_name }}
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
needs:
- deploy
environment:
name: ${{ github.ref_name }}
name: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Archive stage resources
uses: actions/upload-artifact@v3
with:
name: aws-resources-${{ github.ref_name }}
name: aws-resources-${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}
path: resources/aws-resources.json

release:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
)
runs-on: ubuntu-20.04
environment:
name: ${{ inputs.environment || github.event.ref }}
name: ${{ inputs.environment || (startsWith(github.event.ref, 'snyk-') && 'snyk' || github.event.ref) }}
env:
STAGE_NAME: ${{ inputs.environment || github.event.ref }}
STAGE_NAME: ${{ inputs.environment || (startsWith(github.event.ref, 'snyk-') && 'snyk' || github.event.ref) }}
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -61,5 +61,5 @@ jobs:
- uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: ${{ inputs.environment || github.event.ref }}
environment: ${{ inputs.environment || (startsWith(github.event.ref, 'snyk-') && 'snyk' || github.event.ref) }}
onlyRemoveDeployments: true
4 changes: 2 additions & 2 deletions .github/workflows/workspace-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "0 10 * * SUN"

concurrency:
group: ${{ github.ref_name }}-test-ws-setup
group: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}-test-ws-setup

jobs:
test:
Expand Down Expand Up @@ -88,4 +88,4 @@ jobs:
SLACK_ICON: https://github.com/Enterprise-CMCS.png?size=48
SLACK_TITLE: Failure
SLACK_USERNAME: ${{ github.repository }} - ${{job.status}}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<a href="https://codeclimate.com/github/Enterprise-CMCS/macpro-mako/maintainability">
<img src="https://api.codeclimate.com/v1/badges/f4480e77af640e6fa864/maintainability" />
</a>
<a href="https://dependabot.com/">
<img alt="Dependabot" src="https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot">
<a href="https://snyk.io/">
<img alt="Snyk" src="https://img.shields.io/badge/Snyk-protected-purple">
</a>
<a href="https://github.com/prettier/prettier">
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square">
Expand Down
Loading