File tree Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 2525 - name : Tag Docker image
2626 run : docker tag algorithm-exercises-csharp:latest algorithm-exercises-csharp:${{ github.sha }}
2727
28+ - name : Run Snyk to check Docker image for vulnerabilities
29+ # Snyk can be used to break the build when it detects vulnerabilities.
30+ # In this case we want to upload the issues to GitHub Code Scanning
31+ continue-on-error : true
32+ uses : snyk/actions/docker@master
33+ env :
34+ # In order to use the Snyk Action you will need to have a Snyk API token.
35+ # See https://docs.snyk.io/integrations/ci-cd-integrations/github-actions-integration#getting-your-snyk-token
36+ # or you can sign up for free at https://snyk.io/login
37+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
38+ with :
39+ image : algorithm-exercises-csharp:latest
40+ args : --file=Dockerfile
41+ # - name: Upload result to GitHub Code Scanning
42+ # uses: github/codeql-action/upload-sarif@v2
43+ # with:
44+ # sarif_file: snyk.sarif
Original file line number Diff line number Diff line change 1+ # This workflow will build a .NET project
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+ name : .NET Snyk Code analysis
5+
6+ on :
7+ push :
8+ branches : [ main, develop, feature/* ]
9+ pull_request :
10+ branches : [ main ]
11+
12+ jobs :
13+ security :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@master
17+ - uses : snyk/actions/setup@master
18+ - name : Setup .NET
19+ uses : actions/setup-dotnet@v4
20+ with :
21+ dotnet-version : 8.0.x
22+ - name : Restore dependencies
23+ run : dotnet restore algorithm-exercises-csharp.sln
24+ - name : Run Snyk to check for vulnerabilities
25+ run : snyk test algorithm-exercises-csharp/ algorithm-exercises-csharp-test/
26+ env :
27+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
Original file line number Diff line number Diff line change @@ -3,7 +3,14 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0.204-alpine3.19-amd64 AS base
33ENV WORKDIR=/app
44WORKDIR ${WORKDIR}
55
6- FROM node:20.2.0-alpine3.16 AS lint
6+ FROM node:22.1.0-alpine3.19 AS lint
7+
8+ ENV WORKDIR=/app
9+ WORKDIR ${WORKDIR}
10+
11+ COPY ./docs ${WORKDIR}/docs
12+ RUN apk add --update --no-cache make
13+ RUN npm install -g markdownlint-cli
714
815ENV WORKDIR=/app
916WORKDIR ${WORKDIR}
You can’t perform that action at this time.
0 commit comments