docs icon indicating copy to clipboard operation
docs copied to clipboard

sarif-support-for-code-scanning should explain how each field is surfaced

Open jsoref opened this issue 2 years ago • 10 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning

What part(s) of the article would you like to see updated?

For each item documented in this page, there should be an indication of how a user will see the field.

Additional information

I'm currently using "help.text" : "?" and I have yet to discover where this field is surfaced even though the help says:

Required. Documentation for the rule using text format. Code scanning displays this help documentation next to the associated results.

jsoref avatar Sep 25 '22 20:09 jsoref

👋 @jsoref Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Sep 26 '22 13:09 cmwilson21

Hi @jsoref - thanks for opening this issue. You're right. We did intend to describe how each field was surfaced but it sounds as if there may be some changes needed here.

I'm wondering if you have a SARIF file that you've been using for testing this that you're able to share?

felicitymay avatar Sep 28 '22 09:09 felicitymay

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:

github-actions[bot] avatar Sep 28 '22 09:09 github-actions[bot]

One is available as an artifact here: https://github.com/jsoref/retrobot/actions/runs/3141644977

I don't really have one, as I'm iterating my tooling as I go. But, they're more or less all the same. I'm still deciding how things should work, e.g. should I omit rules that are not used by a report? I'm leaning towards doing that, but I haven't yet. And I'm also trying to decide if I should make it easy to dynamically update the descriptions as people don't tend to update my action/workflow terribly quickly and as the descriptions are roughly equivalent to documentation, which in the case of docs.github.com can update independently of the GitHub actions (whether it's GitHub/codeql itself or actions/*).

It'd be nice if there were best practices to answer questions like this...

jsoref avatar Sep 28 '22 11:09 jsoref

Thanks for sharing your artifact ✨

It'd be nice if there were best practices to answer questions like this...

That's a good point.

The new sections from Providing data to track code scanning alerts across runs to "Validating your SARIF file" were added to give guidelines for common problems that people have run into while creating third-party applications.

Clearly there is still room for improvement 🙂

felicitymay avatar Sep 28 '22 13:09 felicitymay

Fwiw, there are some whitespace issues with the examples at the bottom, missing commas and literally odd numbers of spaces for indenting at times.

jsoref avatar Sep 28 '22 14:09 jsoref

This is a gentle bump for the docs team that this issue is waiting for technical review.

github-actions[bot] avatar Oct 26 '22 20:10 github-actions[bot]

This is a gentle bump for the docs team that this issue is waiting for technical review.

github-actions[bot] avatar Nov 24 '22 16:11 github-actions[bot]

This is a gentle bump for the docs team that this issue is waiting for technical review.

github-actions[bot] avatar Dec 24 '22 16:12 github-actions[bot]

This is a gentle bump for the docs team that this issue is waiting for technical review.

github-actions[bot] avatar Jan 23 '23 16:01 github-actions[bot]

This is a gentle bump for the docs team that this issue is waiting for technical review.

github-actions[bot] avatar Feb 21 '23 16:02 github-actions[bot]

This is a gentle bump for the docs team that this issue is waiting for technical review.

github-actions[bot] avatar Mar 22 '23 16:03 github-actions[bot]

👋 Sorry to take so long to get back to you. 🙇 😞

We use the help.text field as a fallback if the markdown field is not provided. We treat them both the same at the moment, however that behaviour may change in future.

simon-engledew avatar Mar 28 '23 14:03 simon-engledew

Thanks for your patience. It looks as if the article now includes the SME's explanation of how help.text and help.markdown behave: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#reportingdescriptor-object.

I suggest that we close this issue.

felicitymay avatar May 03 '23 15:05 felicitymay