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

Setup CodeQL for SAST #65

Closed

Conversation

eyitemi-paystack
Copy link

Setup CodeQL for SAST

Commit to add CodeQL workflow for Static App Security Testing.

Description

Commit to add CodeQL workflow for Static App Security Scanning.

Motivation and Context

This commit allows us to run Github CodeQl as Github Actions and use CodeQL as a Static Application Security Testing tool to identify security vulnerabilities in code before it gets merged to master and deployments made.

Acceptance Criteria

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful. (Please rebase, removing useless commits if not)
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code follows the code style of this project.
  • My change requires change(s) to the environment.
  • My change requires change(s) to the database.
  • Other information.

Fixes #0 (Enter the number for the issue this fixes. If you have not yet created an issue, please do so now or delete this line if you are only submitting a patch)

Changes made by this pull request

Setup CodeQL for SAST

Commit to add CodeQL workflow for Static App Security Testing.

Description
-----------
Commit to add CodeQL workflow for Static App Security Scanning.


Motivation and Context
----------------------
This commit allows us to run Github CodeQl as Github Actions and use CodeQL as a Static Application Security Testing tool to identify security vulnerabilities in code before it gets merged to `master` and deployments made.


Acceptance Criteria
-------------------

Screenshots (if appropriate)
----------------------------

Types of changes
----------------
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist
---------
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->

- [x] My pull request addresses exactly one patch/feature.
- [x] I have created a branch for this patch/feature.
- [x] Each individual commit in the pull request is meaningful. (Please rebase, removing useless commits if not)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [x] My code follows the code style of this project.
- [ ] My change requires change(s) to the environment.
      <!--- Describe the environment changes if any-->
- [ ] My change requires change(s) to the database.
      <!--- Describe the database changes if any-->
- [ ] Other information.
@github-actions
Copy link

Warnings
⚠️ Pull Request size seems relatively large. If this Pull Request contains multiple changes, please split each into separate PR will helps faster, easier review.

Generated by 🚫 Danger Swift against 5dcfb0a

@sonarcloud
Copy link

sonarcloud bot commented Aug 20, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@eyitemi-paystack
Copy link
Author

@ahmed-paystack @Peter-John-paystack please help review 🙏🙏

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
Copy link
Contributor

Choose a reason for hiding this comment

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

@eyitemi-paystack So the problem with CodeQL is that its not scanning our files correctly as we use ObjC and Swift. I have spoke to Jocelyn about this and she said if we are using Sonar to scan this repo which we are already for security vulnerabilities then it should be fine. Ill confirm with her and maybe if you can also check with her 😊

Copy link
Contributor

Choose a reason for hiding this comment

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

@eyitemi-paystack this is the link to Sonar Cloud for this repo for context, https://sonarcloud.io/summary/new_code?id=PaystackHQ_paystack-ios

Copy link
Author

Choose a reason for hiding this comment

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

@Peter-John-paystack yeah, so CodeQl doesn't have full coverage for ObjC at te moment and that's why it's not scanning correctly. Sonar works just fine till we come to a solution. The solution might even be to just use Sonar for all mobile repos

Copy link
Contributor

Choose a reason for hiding this comment

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

@eyitemi-paystack Awesome, thats what I spoke to Jocelyn about so if the security team is happy, we will be using Sonar for all mobile repos. Can we then close this PR? cc: @ahmed-paystack

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please. Let's close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants