Skip to content
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

clean up gosec scan issues #16

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ go-coverage:
grep -v '/vendor/' | \
grep -v '/docs/' \
) > report.json)
gosec --quiet -fmt sonarqube -out gosec.json -no-fail ./...
gosec -fmt sonarqube -out gosec.json -no-fail ./...
sonar-scanner --debug || echo "Sonar scanner is not available"
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
flag.StringVar(&eventOnParent, "parent-event", "ifpresent", "to also send status events on parent policy. options are: yes/no/ifpresent")
flag.StringVar(&defaultDuration, "default-duration", "672h", "The default minimum duration allowed for certificatepolicies to be compliant, must be in golang time format")

flag.Set("logtostderr", "true")
flag.Set("logtostderr", "true") /* #nosec G104 */

flag.Parse()

Expand Down Expand Up @@ -111,7 +111,7 @@ func main() {
// Initialize some variables
generatedClient := kubernetes.NewForConfigOrDie(mgr.GetConfig())
common.Initialize(generatedClient, cfg)
policyStatusHandler.Initialize(generatedClient, mgr, clusterName, namespace, eventOnParent, duration)
policyStatusHandler.Initialize(generatedClient, mgr, clusterName, namespace, eventOnParent, duration) /* #nosec G104 */
// PeriodicallyExecGRCPolicies is the go-routine that periodically checks the policies and does the needed work to make sure the desired state is achieved
go policyStatusHandler.PeriodicallyExecGRCPolicies(frequency)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/grcpolicy/grcpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (r *ReconcileGRCPolicy) Reconcile(request reconcile.Request) (reconcile.Res
}
}
instance.Status.CompliancyDetails = nil //reset CompliancyDetails
handleAddingPolicy(instance)
handleAddingPolicy(instance) /* #nosec G104 */
} else {
handleRemovingPolicy(instance)
// The object is being deleted
Expand Down