-
Notifications
You must be signed in to change notification settings - Fork 484
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
feat: Flux app detail #5331
feat: Flux app detail #5331
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
141558 | Triggered | Generic High Entropy Secret | 134e08c | scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/env-values.yaml | View secret |
1040826 | Triggered | Generic Password | 7d71b8c | manifests/installation-script | View secret |
2763127 | Triggered | Generic High Entropy Secret | 134e08c | scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/secrets-test-values.yaml | View secret |
10220829 | Triggered | Generic High Entropy Secret | 7d71b8c | charts/devtron/values.yaml | View secret |
10220829 | Triggered | Generic High Entropy Secret | 7d71b8c | charts/devtron/devtron-bom.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
||
//handling when the clusterIds string is empty ,it will not support the | ||
if len(clusterIdString) == 0 { | ||
handler.logger.Errorw("error in getting cluster ids", "error", err, "clusterIds", clusterIds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make this error "error in getting cluster ids" constant since used multiple times , also the comment above if check is incomplete
We can use util.ApiError with a proper http status code 404 not found error , and this error string can go in UserMessage as well as Internal message
If there are more such known error strings make them constant and leverage util.ApiError to send error resp with proper https status code
if appIdentifier.IsKustomizeApp == true && appIdentifier.Name == "flux-system" && appIdentifier.Namespace == "flux-system" { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make "flux-system" constant
res, err := handler.fluxApplicationService.GetFluxAppDetail(context.Background(), appIdentifier) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context.Background() -> r.Context()
appList.Errored = &deployedApps.Errored | ||
appList.ErrorMsg = &deployedApps.ErrorMsg | ||
} else { | ||
fluxApps := make([]bean.FluxApplication, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make([]bean.FluxApplication, 0) -> make([]bean.FluxApplication, 0,len(deployedApps.FluxApplication))
Quality Gate passedIssues Measures |
impl.logger.Errorw("error in fetching cluster detail", "err", err) | ||
return nil, err | ||
} | ||
impl.logger.Debugw("successfully fetched the cluster details", "clusterIds", clusters) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Description
Fixes #5332
Checklist:
Does this PR introduce a user-facing change?