Skip to content

Commit

Permalink
use same text for read token details as write token details
Browse files Browse the repository at this point in the history
This was an unintentional regression from v4.13.1

Signed-off-by: Spencer Schrock <[email protected]>
  • Loading branch information
spencerschrock committed Apr 12, 2024
1 parent 21d53ce commit 2901011
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions probes/internal/utils/permissions/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ func ReadTrueLevelFinding(probe string,
r checker.TokenPermission,
metadata map[string]string,
) (*finding.Finding, error) {
f, err := finding.NewWith(fs, probe,
"found token with 'read' permissions",
nil, finding.OutcomeTrue)
text, err := createText(r)
if err != nil {
return nil, fmt.Errorf("%w", err)
return nil, err
}
f, err := finding.NewWith(fs, probe, text, nil, finding.OutcomeTrue)
if err != nil {
return nil, fmt.Errorf("create finding: %w", err)
}
if r.File != nil {
f = f.WithLocation(r.File.Location())
Expand Down

0 comments on commit 2901011

Please sign in to comment.