Be-15 66 Dso Exp10
Be-15 66 Dso Exp10
Subject: DSO
Experiment No. – 10
Program Execution/
formation/ Timely
Viva Experiment
correction/ Submission Sign with Date
(03) Total (10)
ethical practices (01)
(06)
Mahavir Education Trust's
SHAH & ANCHOR KUTCHHI ENGINEERING COLLEGE
Chembur, Mumbai - 400 088
UG Program in Cyber Security
Experiment No. 10
Aim: To implement threat models to identify threats in the system using Threat Dragon.
Lab Outcome: Use Sonarqube and snyk to perform code quality checks and Threat Dragon to
create threat models to identify threats in the system
Theory:
What is SonarQube:
SonarQube is an open-source platform for continuous inspection of code quality. It performs
automatic reviews to detect bugs, security vulnerabilities, and code smells in your project’s
code.
1. Install SonarQube:
o For Ubuntu:
bash
Copy code
sudo apt update
sudo apt install openjdk-11-jdk
wget
https://binaries.sonarsource.com/Distribution/sonarqube/sonarqu
be-8.9.0.43852.zip
unzip sonarqube-8.9.0.43852.zip
cd sonarqube-8.9.0.43852
2. Start SonarQube:
o Start SonarQube by running:
bash
Copy code
./bin/linux-x86-64/sonar.sh start
Mahavir Education Trust's
SHAH & ANCHOR KUTCHHI ENGINEERING COLLEGE
Chembur, Mumbai - 400 088
UG Program in Cyber Security
bash
Copy code
brew install sonar-scanner
properties
Copy code
sonar.projectKey=my_project
sonar.host.url=http://localhost:9000
sonar.login=your_sonarqube_token
bash
Copy code
sonar-scanner
5. Review Results:
o SonarQube will analyze the code and display the results on the dashboard.
Look for security vulnerabilities, bugs, and code smells.
Mahavir Education Trust's
SHAH & ANCHOR KUTCHHI ENGINEERING COLLEGE
Chembur, Mumbai - 400 088
UG Program in Cyber Security
Output:
The following output shows a successful scan and the detection of potential vulnerabilities
and code smells:
makefile
Copy code
INFO: Scanner found 3 bugs, 2 vulnerabilities, 5 code smells in 1 project.
INFO: Analysis report uploaded successfully.
INFO: Quality gate passed.
Conclusion: