OWASP / OWASP/SecurityShepherd
Create Code Analysis with SonarCloud
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 515
- Avg merge
- 3h 46m
- Merged PRs (30d)
- 1
Description
SonarCloud is available for free here: https://github.com/apps/sonarcloud
Someone with access to the OWASP org needs to configure it for us.
Once it's configured we need to;
- Create a user authentication token for the account on SonarCloud.
2. Encrypt this tokentravis encrypt abcdef0123456789 --pro - Before pushing get the OWASP organisation key for SonarCloud
- Create a sonar-project.properties file with the following lines;
sonar-project.properties
# must be unique in a given SonarQube instance
sonar.projectKey=<owaspSecurityShepherd or whatever it is>
Edit the .travis-ci.yaml and add a stage analysis
- stage: analysis
name: "Code Analysis"
services:
- mysql
- docker
language: java
addons:
sonarcloud:
organization: "owasp (or whatever)"
token:
secure: "base64 key"
script: "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=ismisepaul_SecurityShepherd -Pdocker -DmongoDocker -B"
see here https://github.com/ismisepaul/SecurityShepherd/blob/dev/.travis.yml
Example of current code analysis https://sonarcloud.io/dashboard?id=ismisepaul_SecurityShepherd
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing .travis-ci.yaml and the linked example, then verify the OWASP organization key and SonarCloud access requirements. Create sonar-project.properties and configure the analysis stage with the encrypted token; done means Travis can run the SonarCloud analysis without exposing credentials.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd, devops, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100