-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
63 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"/Users/jonathangruber/Documents/4-Code/snyk-cicd-integration-examples/AzurePipelineDecorator/cli:simple-example/snyk-pipeline-decorator-extension-hub.html":[658,1631194645801.656,"24f9204660fb72439c35d2aea8873e8bde34bcde0f4dbae42f9407accaca47b9"],"/Users/jonathangruber/Documents/4-Code/snyk-cicd-integration-examples/AzurePipelineDecorator/extension/snyk-hub.html":[658,1631194645802.9692,"24f9204660fb72439c35d2aea8873e8bde34bcde0f4dbae42f9407accaca47b9"]} | ||
{"/Users/sebastian/git/snyk-labs.snyk-cicd-integration-examples/AzurePipelineDecorator/cli:simple-example/snyk-pipeline-decorator-extension-hub.html":[658,1650357571289.4814,"24f9204660fb72439c35d2aea8873e8bde34bcde0f4dbae42f9407accaca47b9"],"/Users/sebastian/git/snyk-labs.snyk-cicd-integration-examples/AzurePipelineDecorator/extension/snyk-hub.html":[658,1650357571289.939,"24f9204660fb72439c35d2aea8873e8bde34bcde0f4dbae42f9407accaca47b9"]} |
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,12 @@ | ||
# Azure Pipelines | ||
|
||
## Inline display | ||
|
||
Azure pipelines support the inline display of scan results via a [plugin][sarif-viewer-plugin]. | ||
|
||
A sample screenshot is shown below: | ||
|
||
![](azure-pipelines-inline-sarif-example.png) | ||
|
||
|
||
[sarif-viewer-plugin]: https://marketplace.visualstudio.com/items?itemName=sariftools.scans&targetId=bf3858e2-f2d0-4e06-962a-2107402a1234 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
AzurePipelines/cli/simple-example/AzurePipelines-npm-generic-sarif.yml
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,50 @@ | ||
# Runs 4 Snyk Products (Code, Open Source, Container, IaC) | ||
# Outputs the results to the pipeline | ||
|
||
# Prerequisites: | ||
# - Set a SNYK_TOKEN in the pipelines secrets | ||
# - Install the SARIF viewer extension | ||
# https://marketplace.visualstudio.com/items?itemName=sariftools.scans&targetId=bf3858e2-f2d0-4e06-962a-2107402a1234 | ||
|
||
# NOTE: Change this to a different pool to run the scripts. | ||
pool: sebsnyk.pool | ||
|
||
steps: | ||
- checkout: self | ||
|
||
# .. your instructions on building the app or preparing the repository | ||
|
||
# install & prepare snyk | ||
- script: | | ||
npm install -g snyk | ||
snyk auth $(SNYK_TOKEN) | ||
displayName: 'snyk install & auth' | ||
# snyk code | ||
- script: snyk code test --sarif-file-output=CodeAnalysisLogs/snyk-code.sarif | ||
continueOnError: true | ||
displayName: 'snyk code' | ||
|
||
# snyk open source | ||
- script: snyk test --sarif-file-output=CodeAnalysisLogs/snyk-open-source.sarif | ||
continueOnError: true | ||
displayName: 'snyk open source' | ||
|
||
# snyk container | ||
# NOTE: Change this to your container name | ||
- script: snyk container test sebsnyk/juice-shop --file=Dockerfile --sarif-file-output=CodeAnalysisLogs/snyk-container.sarif | ||
continueOnError: true | ||
displayName: 'snyk container' | ||
|
||
# snyk iac | ||
- script: snyk iac test --sarif-file-output=CodeAnalysisLogs/snyk-iac.sarif | ||
continueOnError: true | ||
displayName: 'snyk iac' | ||
|
||
# publish the results | ||
- task: PublishBuildArtifacts@1 | ||
displayName: "Publish Artifact: CodeAnalysisLogs" | ||
condition: succeededOrFailed() | ||
inputs: | ||
PathtoPublish: $(Build.SourcesDirectory)/CodeAnalysisLogs | ||
ArtifactName: CodeAnalysisLogs |
File renamed without changes.
File renamed without changes.