Skip to content

Commit 3e4355e

Browse files
committed
Fix lint finding and only scan for verified secrets
1 parent 1529212 commit 3e4355e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/secrets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
with:
1010
fetch-depth: 0
1111
- name: TruffleHog OSS
12-
uses: trufflesecurity/trufflehog
12+
uses: trufflesecurity/trufflehog@main
1313
with:
1414
path: ./
1515
base: ${{ github.event.repository.default_branch }}
1616
head: HEAD
17-
extra_args: --debug
17+
extra_args: --debug --only-verified

pkg/cloudsql/cloudsql.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Instances map[InstanceID]Databases
2323
// EnumerateCloudSQLDatabaseInstances enumerates Cloud SQL database instances in the given project.
2424
func EnumerateCloudSQLDatabaseInstances(ctx context.Context, sqlAdminSvc *sqladmin.Service, projectID, instanceID string) (Instances, error) {
2525
log.Printf("Enumerating Cloud SQL instances in project %s", projectID)
26-
26+
2727
instances := Instances{}
2828

2929
enumerated := []string{}
@@ -87,8 +87,7 @@ func AddRoleBindingToGCSBucket(ctx context.Context, storageSvc *storage.Service,
8787
}
8888
}
8989

90-
// Update the policy
91-
policy, err = storageSvc.Buckets.SetIamPolicy(bucketName, policy).Do()
90+
_, err = storageSvc.Buckets.SetIamPolicy(bucketName, policy).Do()
9291
if err != nil {
9392
return err
9493
}

0 commit comments

Comments
 (0)