GithubHelp home page GithubHelp logo

sarif-azuredevops-extension's Introduction

SARIF SAST Scans Tab

See vss-extension.md for public facing info. This is for contributors/developers.

Development: DevOps Dev

  • npm run publish-dev
  • go to: https://dev.azure.com/jeffkingms/Project%20Zero/_workitems/edit/1/

Development: DevOps BaseUri

  • npm run publish-dev with baseUri
  • go to: https://localhost:8080 and bypass the chrome warning.
  • go to: https://dev.azure.com/jeffkingms/Project%20Zero/_workitems/edit/1/

Deployment

Verify vss-extension.prod.json property version is incremented. If not, you risk overriting an old vsix.

npx webpack
npx tfx extension create --output-path: vsix --overrides-file vss-extension.prod.json

This creates a file in your ./vsix folder named sariftools.scans-0.1.0.vsix (version number will differ).

Upload the vsix file to https://marketplace.visualstudio.com/manage/publishers/YOUR_PUBLISHER_ID. On that page, find the matching extension, choose โ‹ฏ, and choose Update.

Remember to commit any vss-extension.json version changes.

New API

import('azure-devops-extension-sdk').init() results in "No handler found on any channel for message" and "Error: Cannot get registered instance for : JeffKingO.scans-dev.workitem-tab"

import * as SDK from 'azure-devops-extension-sdk'
import { IWorkItemFormService, WorkItemTrackingServiceIds } from 'azure-devops-extension-api/WorkItemTracking'

SDK.init({
	applyTheme: true,
	loaded: true,
})
;(async () => {
	await SDK.ready()
	console.info('Version', SDK.getExtensionContext().version)

	const workItem = await SDK.getService<IWorkItemFormService>(WorkItemTrackingServiceIds.WorkItemFormService)
	const relations = await workItem.getWorkItemRelations()
	console.log(relations)
})()

sarif-azuredevops-extension's People

Contributors

50wliu avatar dependabot[bot] avatar easyrhinomsft avatar jeffersonking avatar michaelcfanning avatar microsoft-github-policy-service[bot] avatar nwcm avatar tbreckle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sarif-azuredevops-extension's Issues

Not getting any results on the scan tab of Azure DevOps Build (SARIF Scan View is empty)

We have successfully installed the SARIF Scan extension for our ADO organization but it's not showing any result on the scan tab of Azure DevOps Build. Could you please guide if we are missing something here. Please let me know if you need any additional information.

Note: Microsoft Security DevOps extension task in part of build pipeline and build is successful without any issue.

How to set Scan Tab Header Titles

In our project we are doing many sarif scans: trivy + hadolint for every container we are going to build.
All sarif files ending up in CodeAnalysisLogs with their respective name e.g. hadolint-{containerName}.sarif or trivy-{containerName}.sarif.

But in the Scans Tab their accordions are listed only like this
image

Whats the cause of it?

Description of how filters (Unchange, New, ..) are working

We started to use this extension and we like it so far.

Now we would like e.g. to see which new findings have been introduced and we have seen the "Baseline" filters on the view.

In case I am using the filter "New" against which baseline of findings the current findings are being compared?

What is the definition of baseline?

SARIF View is empty after Upgrade to 0.5.0

Azure DevOps Service automatically upgrades SARIF to 0.5.0. Now the SARIF View stays empty. It doesn't matter if filters are set or unset.

Bildschirmfoto 2023-05-22 um 11 02 01 Bildschirmfoto 2023-05-22 um 11 02 15

For me, the console output is not helpful, but maybe someone here is able to debug using these few information:

Bildschirmfoto 2023-05-22 um 11 00 12

SARIF SAST Scans Tab not showing scan results

Hi I added Microsoft Security DevOps task and installed SARIF SAST Scans Tab. I can see the artifacts that is getting generated with the extension msdo.sarif but i am not seeing any output in the Scans tab. It shows a blank page. Could you please help us on this

How to check or read a SARIF file for any vulnerabilities found or not found during code scanning

Hello,

I wanted to find out if there is a way to check/read the SARIF file regarding the detection of any vulnerabilities in a pipeline run?

To provide some context I have implemented GHAS for Azure DevOps in all my yaml pipelines and I would like to use a condition or set some checks in the same pipeline to check whether or not the Advanced Security Perform CodeQL analysis task has detected any vulnerabilities and depending on whether or not there are vulnerabilities detected I can choose to run or skip a subsequent task(s) in the same pipeline, or, for example, force the pipeline to complete with issues etc. There does not seem to be any sort of 'out of the box' way to do this.

I noticed that whether or not the task has found any vulnerabilities, the task has a built-in variable which it always sets to 'true', and it will publish a SARIF file (variable shown below). In the scans tab of the pipeline, if no vulnerabilities are detected, it will display a "No results found..." image. It would have been great if that variable would be set to false if no vulnerabilities were found as I could use that to determine whether or not to run or skip a subsequent task(s) in the same pipeline.

##[debug]Processed: ##vso[task.setvariable variable=advancedsecurity.codeql.results.published;isOutput=false;issecret=false;]true

To try and explain better of what I am trying to achieve, I am currently doing something similar with the Advanced Security Dependency Scanning task whereby I am reading the log file from the task which actually states if any vulnerabilities have been found. For example, the log file contains the below if vulnerabilities have been found,

[WRN] Dependency Scanning has detected

Depending on whether or not the Advanced Security Dependency Scanning task has detected any vulnerabilities, I can set a custom variable which I can use in subsequent task(s) in the same pipeline, for example, forcing the pipeline to complete with issues if there are any dependency vulnerabilities detected.

If you can provide any ideas on how I can achieve what I am trying to do that will be greatly appreciated.

Apologies if I have not raised this is the correct place. If you can redirect me that would be great.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.