Skip to content

Commit

Permalink
Merge pull request #1 from petersnick/sast-start
Browse files Browse the repository at this point in the history
Sast start
  • Loading branch information
petersnick authored Mar 27, 2024
2 parents bb08dd6 + 0fe8977 commit 1ac05f6
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 26 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Integration

on:
push:
branches: [ steven-demo-start ]
branches: [ sast-start ]
pull_request:
branches: [ development, main ]
types: [opened, synchronize, reopened]
Expand All @@ -27,32 +27,32 @@ jobs:
- run: npm i
- run: npm run build

sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_DEMO }}
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_DEMO }}

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: false
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
# security:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: Run Snyk to check for vulnerabilities
# uses: snyk/actions/node@master
# continue-on-error: false
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# with:
# command: monitor

unit-tests:
unit-tests:

runs-on: ubuntu-latest

Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,31 @@ jobs:
- uses: actions/checkout@v3
- run: docker build . -t ${{secrets.DOCKERHUB_USERNAME}}/nest-demo-app
- run: echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin
- run: docker push ${{secrets.DOCKERHUB_USERNAME}}/nest-demo-app
- run: docker push ${{secrets.DOCKERHUB_USERNAME}}/nest-demo-app


# snyk_image_scanning:

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - name: Build the Docker image
# run: docker build -t ${{secrets.DOCKERHUB_USERNAME}}/nest-demo-app .
# - name: Run Snyk to check Docker image for vulnerabilities
# # Snyk can be used to break the build when it detects vulnerabilities.
# # In this case we want to upload the issues to GitHub Code Scanning
# continue-on-error: true
# uses: snyk/actions/docker@master
# env:
# # In order to use the Snyk Action you will need to have a Snyk API token.
# # More details in https://github.com/snyk/actions#getting-your-snyk-token
# # or you can signup for free at https://snyk.io/login
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# with:
# image: ${{secrets.DOCKERHUB_USERNAME}}/nest-demo-app
# args: --file=Dockerfile --exclude-base-image-vulns
# - name: Upload Snyk report as sarif 📦
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: snyk.sarif
4 changes: 4 additions & 0 deletions src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ export class AppService {
getHello(): string {
return 'Hello World New Docker Image!';
}
/**
* // TODO: Make SAST scanning
* use the .github folder files to fix this
*/
}

0 comments on commit 1ac05f6

Please sign in to comment.