Skip to content

Commit e02a822

Browse files
authored
Update GitHub analyzer to use correct AnalyzerType in results (#4188)
Changed AnalyzerType from 0 to 7 in both the GitHub analyzer implementation and its associated tests to reflect the correct type for GitHub analysis.
1 parent d589c2f commit e02a822

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/analyzer/analyzers/github/github.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func secretInfoToAnalyzerResult(info *common.SecretInfo) *analyzers.AnalyzerResu
3737
return nil
3838
}
3939
result := &analyzers.AnalyzerResult{
40+
AnalyzerType: analyzers.AnalyzerTypeGitHub,
4041
Metadata: map[string]any{
4142
"owner": info.Metadata.User.Login,
4243
"type": info.Metadata.Type,

pkg/analyzer/analyzers/github/github_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestAnalyzer_Analyze(t *testing.T) {
3535
key: analyzerSecrets.MustGetField("GITHUB_FINEGRAINED_ALLREPOS_ACTIONS_RW_CONTENTS_RW_ISSUES_RW"),
3636
wantErr: false,
3737
want: `{
38-
"AnalyzerType": 0,
38+
"AnalyzerType": 7,
3939
"Bindings": [
4040
{
4141
"Resource": {
@@ -240,7 +240,7 @@ func TestAnalyzer_Analyze(t *testing.T) {
240240
name: "v2 ghp",
241241
key: testSecrets.MustGetField("GITHUB_VERIFIED_GHP"),
242242
want: `{
243-
"AnalyzerType": 0,
243+
"AnalyzerType": 7,
244244
"Bindings": [
245245
{
246246
"Resource": {

0 commit comments

Comments
 (0)