-
Notifications
You must be signed in to change notification settings - Fork 505
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
Feature: Make existing results more structured #1874
Comments
friendly ping: would love to hear comments or feedback. I think this would help users prioritize their remediation. It's also something thats been asked at least a couple times in the issues |
SGTM. |
SGTM! |
I think to be even broader, we need a flag that is either positive or negative. For example, some results are positive
|
A first use case is to lower the severity of |
In addition, we should expose the |
Below is how I think we could augment the existing results to be more structured: type Impact string // PositiveLow, etc - see https://github.com/ossf/scorecard/issues/1874#issuecomment-1126265840
type Path struct{
Type // File, URL, etc
Value // will let you create links to original repo file, e.g. deps.dev when they show the results
LineStart *uint
LineEnd *uint
}
type RemediationEffort string // Minutes, Hours, Days, Weeks, etc. or Low/Medium/High/etc?
// Note: we have started work towards this in https://github.com/ossf/scorecard/issues/1850
type Remediation struct{
Text string // For human
TextMarkdown string // For human
Patch string // For machines, e.g to create a pull request
Effort RemediationEffort
}
type DetailID struct{
Short string // short description
URL string
ID string // Will help with policy/configuration, e.g. to disable a type of detail results or to take an action, e.g. in GH Action https://github.com/ossf/scorecard-action/issues/729
}
type DevAnnotation struct {
Text string // string provided by developers about the check results, e.g., why they don't pass it
Path Path // location of the annotation
}
type CheckResult struct {
Name string
Impact *Impact // Useful to deps.dev and Action https://github.com/ossf/scorecard-action/issues/729
Remediation *Remediation
DevAnnotation *DevAnnotation
Details [] struct{
Path Path
Impact *Impact
Remediation *Remediation
ID *DetailID
Score int // no change
DevAnnotation *DevAnnotation
}
} |
/cc @raghavkaul |
We probably need to define the functionality and do some writeup and then define the structure/implementation. Thoughts? |
In terms of implementation, We already have a remediation field as well (added recently), so it should be easy to add to the final results too. I would start the rest of the implementation by building support for each detail's I'm not sure sure how we want to expose this in the CLI: part of |
hi @laurentsimon , if you need testers in this work to make more structured results, i'm happy to help. can continue this conversation here or on slack, whatever works better |
Here's the short-term plan.
I will share more in the next bi-weekly meeting about the current design. I also have a branch for folks to try it out on a subset of checks. |
This issue is stale because it has been open for 60 days with no activity. |
don't close |
We have severity at the level of a check today.
However, within a check, severity may vary. For example, contents: write is more critical than status: write, for example.
This could then be exposed in SARIF in the action ossf/scorecard-action#210
The text was updated successfully, but these errors were encountered: