-
Notifications
You must be signed in to change notification settings - Fork 483
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
sql injection fix #6078
sql injection fix #6078
Conversation
…g ciPipelineMaterial in orch and gitsensor
…oring around depl history service
…ntTemplate as it makes sense for all depl template service layer methods to be at one place , this is part one of such refactoring
…ntTemplate as it makes sense for all depl template service layer methods to be at one place , this is part one of such refactoring
…out from ConfigMapHistoryService.go
* chore: updated email templates subject * chore: down script for email template added * chore: code refactoring * chore: code feedback for down template incorporated * chore: code formatting * chore: minifies queries * fix: down sql app name variable issue fix * chore: renamed migration * chore: migration updated * CHORE: updated template query
…-oss fix: Linked cd ci pod spawn fix oss
chore: Read service for DeploymentTemplateHistoryService and ConfigMapHistoryService
fix: cluster namespace list informer
* updated and retry on get server api * error refactor * added comments * server version check
2d1c7ad
* updated k8s.io/kubernetes from v1.29.6 to k8s.io/kubernetes v1.29.7 * jwt upgraded to github.com/golang-jwt/jwt/v4 v4.5.1 * version upgrade * common-lib sync --------- Co-authored-by: prakhar katiyar <[email protected]> Co-authored-by: prakhar katiyar <[email protected]>
* created CiTemplateReadService.go * created CiTemplateReadService.go * created CiTemplateReadService.go * fix for CiTemplateService_test.go
* feat: added is_prod col in cluster (#6046) * added is_prod col in cluster * migration added * migration added * migration added * migration added * migrations number
Quality Gate failedFailed conditions |
func (impl ConfigMapHistoryServiceImpl) CreateHistoryFromAppLevelConfig(appLevelConfig *chartConfig.ConfigMapAppModel, configType repository.ConfigType) error { | ||
pipelines, err := impl.pipelineRepository.FindActiveByAppId(appLevelConfig.AppId) | ||
if err != nil { | ||
impl.logger.Errorw("err in getting pipelines, CreateHistoryFromAppLevelConfig", "err", err, "appLevelConfig", appLevelConfig) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Sensitive data returned by an access to secretKeyValueData
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to ensure that sensitive information is not logged in clear text. The best way to fix this without changing existing functionality is to remove the sensitive data from the logging statement or to obfuscate it before logging. In this case, we will remove the appLevelConfig
from the logging statement on line 70 in pkg/deployment/manifest/configMapAndSecret/ConfigMapHistoryService.go
.
-
Copy modified line R70
@@ -69,3 +69,3 @@ | ||
if err != nil { | ||
impl.logger.Errorw("err in getting pipelines, CreateHistoryFromAppLevelConfig", "err", err, "appLevelConfig", appLevelConfig) | ||
impl.logger.Errorw("err in getting pipelines, CreateHistoryFromAppLevelConfig", "err", err) | ||
return err |
} | ||
resolvedConfigDataStringJson, err := utils.ConvertToJsonRawMessage(resolvedConfigDataString) | ||
if err != nil { | ||
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "resolvedJson", resolvedConfigDataStringJson, "err", err) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Sensitive data returned by an access to SecretKey
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to ensure that sensitive information is not logged in clear text. The best way to fix this is to obfuscate or remove the sensitive data before logging. In this case, we should remove the sensitive data from the log message.
- In
pkg/deployment/manifest/configMapAndSecret/read/ConfigMapHistoryReadService.go
, we need to modify the logging statement on line 437 to exclude the sensitive data. - We will remove the
resolvedJson
field from the log message to ensure that sensitive information is not logged.
-
Copy modified line R437
@@ -436,3 +436,3 @@ | ||
if err != nil { | ||
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "resolvedJson", resolvedConfigDataStringJson, "err", err) | ||
impl.logger.Errorw("getCmCsPublishedConfigResponse, error in ConvertToJsonRawMessage for resolvedJson", "err", err) | ||
return nil, err |
Description
Fixes #
Checklist:
Does this PR introduce a user-facing change?