Add a project to CodeScan from GitHub
Last updated
Last updated
This document guides you how to add a GitHub project to your CodeScan cloud account and run the analysis.
Log in to your CodeScan account.
On the top right corner, click on the '+' icon and select Analyze new project.
This takes you to a different window. Choose the Organization for which you'd like to create a project. Click Set Up.
On the next window, click on Add Analysis Project.
You will now see a new pop-up window; select GitHub from the given option.
Once you select GitHub, it will redirect you to the GitHub login page. Validate your credentials and click on Sign In.
On the next screen, fill in the details below:
Choose the Repository you want to add, followed by the Project Branch name. NOTE: If you do not specify the Branch Name during GitHub integration, then it will take the main branch by default.
Make sure you select the checkbox under Check Pull Requests. NOTE: Admin permissions in GitHub are required, or else the pull request will not be triggered, even though a user may be able to select the box to "check pull requests" during GitHub integration.
The Project Key and the Project Name are automatically assigned. You can edit the fields per your requirements.
Click on Add and Run Now.
About Project Key: To find the project key, refer to our documentation HERE.
This triggers the project analysis and the project being added under your CodeScan organization.
You can view the project analysis report by clicking on Details from your VC repository.
When you click the link, it will take you to the CodeScan Project page, where you can view your project's log report.
Now that the webhooks have been created, every time there is a push to the tracked branch or a pull request made/updated against the tracked branch, an analysis will be triggered in CodeScan.
Known limitation from GitHub: When an analysis is triggered, CodeScan requests a token to GitHub, which has a limitation of 10 tokens per hour per user per application. For more information, refer to Token Expiration and Revocation on GitHub Docs.
Error: Expected — Waiting for status to be reported This is a GitHub issue. To prevent recursive workflow, users are not able to trigger a subsequent workflow, leading it to The Eternal Pending State. If this occurs, you will need to reattach the project. For additional information, refer to the following article on this issue: GitHub Actions: Bypassing Expected — Waiting for status to be reported