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

How to set Scan Tab Header Titles #45

Open
mweihberg opened this issue Apr 24, 2024 · 3 comments
Open

How to set Scan Tab Header Titles #45

mweihberg opened this issue Apr 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@mweihberg
Copy link

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?

@mweihberg
Copy link
Author

mweihberg commented Apr 24, 2024

Maybe i´ve found the lines of code which causes this behaviour.
https://github.com/microsoft/sarif-azuredevops-extension/blob/d6f6de3cd58f9ba7d3779b395355abeb5f1d89f4/src/build.tsx#L129C4-L137C5

// Show file names when the tool names are homogeneous.
if (files.length > 1 && toolNamesSet.size === 1) {
		logs.forEach((log, i) =>
			log.runs.forEach(run => {
				run.properties = run.properties || {}
				run.properties['logFileName'] = files[i].name
			})
		)
}

I don´t think that this behaviour is really useful. Its difficult to get the information for a specific run.

@winstliu
Copy link
Member

winstliu commented Jun 8, 2024

Agreed, I've also found this confusing.

@winstliu winstliu added the enhancement New feature or request label Jun 8, 2024
@mweihberg
Copy link
Author

I created a fork and deployed on our local TFS with

if (files.length > 1) {
		logs.forEach((log, i) =>
			log.runs.forEach(run => {
				run.properties = run.properties || {}
				run.properties['logFileName'] = files[i].name
			})
		)
}

It worked!

So please try to enhance it for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants