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

Create codeql-analysis.yml #5234

Merged
merged 12 commits into from
Sep 7, 2022
Merged

Create codeql-analysis.yml #5234

merged 12 commits into from
Sep 7, 2022

Conversation

antgamdia
Copy link
Contributor

@antgamdia antgamdia commented Aug 24, 2022

Description of the change

While having a look at the repo settings, I noticed we didn't enable the CodeQL built-in support that GitHub offers for analyzing the code quality. This PR is the result of clicking on "enable" and adding a couple of copyright lines + customizing the cron, but otherwise it's the default config.

See an example of an alert below:

image

Benefits

Periodic report of the code quality status directly in Github

Possible drawbacks

More noise, but we can always allowlist any alert if think so

Applicable issues

Additional information

The results are stored in the "security" section of the github repo.

Signed-off-by: Antonio Gámez, PhD <agamez@vmware.com>
@netlify
Copy link

netlify bot commented Aug 24, 2022

Deploy Preview for kubeapps-dev canceled.

Name Link
🔨 Latest commit 47fd427
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/63176518113da00008fd32a3

Copy link
Collaborator

@castelblanque castelblanque left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@antgamdia
Copy link
Contributor Author

There are two issues with this PR:

  • 1 issue was detected with this workflow: Please make sure that every branch in on.pull_request is also in on.push so that Code Scanning can compare pull requests against the state of the base branch. Minor issue, I'll fix after having a look at the docs.
  • There are actual detected problems that need to be fixed. I'll do it in a stacked PR soon.

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@antgamdia antgamdia marked this pull request as draft August 30, 2022 17:49
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

Conflicts:
	cmd/kubeops/Dockerfile
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

Conflicts:
	cmd/apprepository-controller/Dockerfile
	cmd/asset-syncer/Dockerfile
	cmd/kubeapps-apis/Dockerfile
log.Infof("+helm AddPackageRepository '%s' pointing to '%s'", request.GetName(), request.GetUrl())
repoName := request.GetName()
repoUrl := request.GetUrl()
log.Infof("+helm AddPackageRepository '%s' pointing to '%s'", repoName, repoUrl)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

Sensitive data returned by [an access to UsernamePassword](1) is logged here.
log.Infof("+helm AddPackageRepository '%s' pointing to '%s'", request.GetName(), request.GetUrl())
repoName := request.GetName()
repoUrl := request.GetUrl()
log.Infof("+helm AddPackageRepository '%s' pointing to '%s'", repoName, repoUrl)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

Sensitive data returned by [an access to UsernamePassword](1) is logged here.
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@antgamdia antgamdia marked this pull request as ready for review September 6, 2022 16:04
@antgamdia antgamdia merged commit 4cadfb9 into main Sep 7, 2022
@antgamdia antgamdia deleted the add-codeql-gha branch September 7, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add static code analysis to CI
3 participants