Skip to content

Commit

Permalink
rename checkAndLogNotAvailableOrNotApplicable to isBothUndeclaredAndN…
Browse files Browse the repository at this point in the history
…otAvailableOrNotApplicable

Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz committed Mar 11, 2024
1 parent d90bf93 commit 7bdcbd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checks/evaluation/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TokenPermissions(name string,
})
}

if checkAndLogNotAvailableOrNotApplicable(f, dl) {
if isBothUndeclaredAndNotAvailableOrNotApplicable(f, dl) {
return checker.CreateInconclusiveResult(name, "Token permissions are not available")
}

Check warning on line 94 in checks/evaluation/permissions.go

View check run for this annotation

Codecov / codecov/patch

checks/evaluation/permissions.go#L93-L94

Added lines #L93 - L94 were not covered by tests

Expand Down Expand Up @@ -220,7 +220,7 @@ func updateScoreFromUndeclaredTop(undeclaredPermissions map[string]map[string]bo
return score
}

func checkAndLogNotAvailableOrNotApplicable(f *finding.Finding, dl checker.DetailLogger) bool {
func isBothUndeclaredAndNotAvailableOrNotApplicable(f *finding.Finding, dl checker.DetailLogger) bool {
if f.Values["permissionLevel"] == string(checker.PermissionLevelUndeclared) {
if f.Outcome == finding.OutcomeNotAvailable {
return true

Check warning on line 226 in checks/evaluation/permissions.go

View check run for this annotation

Codecov / codecov/patch

checks/evaluation/permissions.go#L226

Added line #L226 was not covered by tests
Expand Down

0 comments on commit 7bdcbd5

Please sign in to comment.