Skip to content
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 argocd-operator/controllers/argocd/dex.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (r *ReconcileArgoCD) getOpenShiftDexConfig(cr *argoproj.ArgoCD) (string, er
Config: map[string]any{
"issuer": "https://kubernetes.default.svc", // TODO: Should this be hard-coded?
"clientID": getDexOAuthClientID(cr),
"clientSecret": "$oidc.dex.clientSecret",
"clientSecret": "$oidc.dex.clientSecret", // #nosec G101 -- this is a Dex config reference placeholder resolved at runtime, not a credential
"redirectURI": redirectURI,
"insecureCA": true, // TODO: Configure for openshift CA,
"groups": groups,
Expand Down
2 changes: 1 addition & 1 deletion argocd-operator/controllers/argocd/image_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ func (r *ReconcileArgoCD) reconcileImageUpdaterDeployment(cr *argoproj.ArgoCD, s
Name: "ssh-signing-key",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: "ssh-git-creds",
SecretName: "ssh-git-creds", // #nosec G101 -- this is a Secret resource name, not a credential
Optional: new(true),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func buildVolumes() []corev1.Volume {
Name: "userpass-passwd",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: "argocd-agent-agent-userpass",
SecretName: "argocd-agent-agent-userpass", // #nosec G101 -- this is a Secret resource name, not a credential
Items: []corev1.KeyToPath{
{
Key: "credentials",
Expand Down
4 changes: 2 additions & 2 deletions argocd-operator/controllers/argocdagent/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func buildVolumes() []corev1.Volume {
Name: "jwt-secret",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: "argocd-agent-jwt",
SecretName: "argocd-agent-jwt", // #nosec G101 -- this is a Secret resource name, not a credential
Items: []corev1.KeyToPath{
{
Key: "jwt.key",
Expand All @@ -236,7 +236,7 @@ func buildVolumes() []corev1.Volume {
Name: "userpass-passwd",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: "argocd-agent-principal-userpass",
SecretName: "argocd-agent-principal-userpass", // #nosec G101 -- this is a Secret resource name, not a credential
Items: []corev1.KeyToPath{
{
Key: "passwd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ func sigHandler() {
// Keep the daemon busy by waiting for signals to come
for sig := range signalChannel {
if sig == syscall.SIGHUP {
d.ReloadConfigFile(configPath)
if err := d.ReloadConfigFile(configPath); err != nil {
mainlog.WithError(err).Error("Failed reloading config file")
}
} else if sig == syscall.SIGUSR1 {
d.ReopenLogs()
if err := d.ReopenLogs(); err != nil {
mainlog.WithError(err).Error("Failed reopening logs")
}
} else if sig == syscall.SIGTERM || sig == syscall.SIGQUIT || sig == syscall.SIGINT {
mainlog.Infof("Shutdown signal caught")
d.Shutdown()
Expand Down
1 change: 1 addition & 0 deletions argocd-operator/tests/ginkgo/fixture/argocd/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ func StreamFromArgoCDEventSourceURL(ctx context.Context, eventSourceAPIURL strin

req = req.WithContext(ctx)

// #nosec G124 -- this is an outbound request cookie (client to server); Secure/HttpOnly/SameSite are response-only attributes and don't apply here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

cookie := &http.Cookie{
Name: "argocd.token",
Value: sessionToken, // session token
Expand Down
1 change: 1 addition & 0 deletions argocd-operator/tests/ginkgo/fixture/gitserver/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func (r *Repo) git(args ...string) (string, error) {
return "", fmt.Errorf("repository has not been cloned")
}

// #nosec G204
cmd := exec.Command("git", args...)
cmd.Dir = r.cloneDir.Name()
if r.transport == TransportHTTPS {
Expand Down
Loading