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 #76

Merged
merged 2 commits into from
Sep 29, 2022
Merged

Create codeql-analysis.yml #76

merged 2 commits into from
Sep 29, 2022

Conversation

DrShaneGreen
Copy link
Contributor

@DrShaneGreen DrShaneGreen commented May 27, 2022

This pull request enables GitHub Advanced Security, but most importantly, enables CodeQL on your repository.

The purpose of this issue is:

  1. Give you some context as to why this pull request was created.
  2. Provide you with some links to help you understand what CodeQL and GitHub Advanced Security are.
  3. Help you with some automated entries instead of doing this manually.

As a company, we are moving towards CodeQL for our static analysis tool. We didn't want to go and raise a pull request for every repository manually, and we didn't expect you to have to go and manually create a pull request for every single repositor either. So here is a pull request for you to review and hopefully approve!

We are rolling out CodeQL per language/user, so if you have only got a pull request for a few of your repositories, not to worry, more will come soon.

Hopefully, you should see a nice green status tick next to CodeQL within the status section of the pull request. However, if you haven't, that's understandable. We have taken the best guess approach at configuring CodeQL for you, but 1) we are still maturing, and 2) codeql can differ repository by repository.

If you have a red X next to CodeQL, that means that CodeQL is not configured for your repository. You may need to go ahead and edit the codeql-analysis.yml file to get it working with your build process/codebase. Some information on that can be found below:

  1. Complied Languages with CodeQL
  2. Configuring Code Scanning.

If you need any more assistance, please don't hesitate to contact the Application Security team. We are here to help.

Thanks!

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary

@DrShaneGreen DrShaneGreen requested a review from a team as a code owner May 27, 2022 15:49
@yuokada
Copy link
Contributor

yuokada commented May 30, 2022

Ruby 2.5 is already EOL.
https://www.ruby-lang.org/en/downloads/branches/

We might be able to remove it from testing targets.

@DrShaneGreen
Copy link
Contributor Author

@tiana528
I pushed an empty commit to ensure that the CodeQL will run successfully.

No issues were found.

The ruby 2,6 and 2.7 seem to be failing in the test. are we using these version and need to scan them?

# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

Choose a reason for hiding this comment

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

The PR looks good to me.
@yuokada Could you please help take a look at this PR?

Copy link
Contributor

@yuokada yuokada left a comment

Choose a reason for hiding this comment

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

CodeQL itself works correctly. So, we can merge this pull request into master.
https://github.com/treasure-data/trino-client-ruby/actions/workflows/codeql-analysis.yml

However, It's better to merge after CI pass.

@yuokada
Copy link
Contributor

yuokada commented Sep 29, 2022

#77 is merged into master. Going to rebase and exclude some unnecessary commits.

DrShaneGreen and others added 2 commits September 29, 2022 15:04
This pull request enables [GitHub Advanced Security](https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security), but most importantly, enables [CodeQL](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql) on your repository. 

The purpose of this issue is:

1) Give you some context as to why this pull request was created.
2) Provide you with some links to help you understand what CodeQL and GitHub Advanced Security are.
3) Help you with some automated entries instead of doing this manually. 

As a company, we are moving towards CodeQL for our static analysis tool. We didn't want to go and raise a pull request for every repository manually, and we didn't expect you to have to go and manually create a pull request for every single repositor either. So here is a pull request for you to review and hopefully approve!

We are rolling out CodeQL per language/user, so if you have only got a pull request for a few of your repositories, not to worry, more will come soon. 

Hopefully, you should see a nice green status tick next to CodeQL within the status section of the pull request. However, if you haven't, that's understandable. We have taken the best guess approach at configuring CodeQL for you, but 1) we are still maturing, and 2) codeql can differ repository by repository. 

If you have a red X next to CodeQL, that means that CodeQL is not configured for your repository. You may need to go ahead and edit the codeql-analysis.yml file to get it working with your build process/codebase. Some information on that can be found below:

1) [Complied Languages with CodeQL](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages)
2) [Configuring Code Scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning).

If you need any more assistance, please don't hesitate to contact the Application Security team. We are here to help. 

Thanks!
- Application Security :) 
  Shane.Green@treasure-data.com
@yuokada yuokada merged commit 5c9b488 into master Sep 29, 2022
@yuokada yuokada deleted the SECU-1152 branch September 29, 2022 06:07
@exoego exoego added the chore non user-facing trivial stuff (CI, refactoring, etc) label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore non user-facing trivial stuff (CI, refactoring, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants