https://github.com/piecioshka/demo-sonarqube
🚁 Demo project showing how SonarQube detects code quality and security issues in JavaScript.
https://github.com/piecioshka/demo-sonarqube
code quality sonarqube youtube
Last synced: about 1 month ago
JSON representation
🚁 Demo project showing how SonarQube detects code quality and security issues in JavaScript.
- Host: GitHub
- URL: https://github.com/piecioshka/demo-sonarqube
- Owner: piecioshka
- Created: 2026-03-04T12:35:32.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-14T12:10:57.000Z (5 months ago)
- Last Synced: 2026-04-23T12:34:49.093Z (3 months ago)
- Topics: code, quality, sonarqube, youtube
- Language: JavaScript
- Homepage: https://www.youtube.com/watch?v=y4L8_Ie8oj8
- Size: 110 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# demo-sonarqube
🚁 Demo project showing how SonarQube detects code quality and security issues in JavaScript.
## Video
Follow instructions in this video to set up SonarQube and analyze this project:
## Project structure
```
src/
auth.js - authentication module (SQL injection, command injection examples)
calculator.js - math utilities (eval usage, code smells examples)
tests/
auth.test.js
calculator.test.js
```
## Intentional issues (for SonarQube demo)
| File | Issue | Type |
| ------------------- | --------------------------------------- | ---------------------------- |
| `src/auth.js` | SQL query built by string concatenation | Security - SQL Injection |
| `src/auth.js` | Hardcoded default password `admin123` | Security - Sensitive Data |
| `src/auth.js` | `exec()` called with unsanitized input | Security - Command Injection |
| `src/calculator.js` | Use of `eval()` | Security - Code Injection |
| `src/calculator.js` | Duplicate null/undefined check | Bug - Copy-paste error |
| `src/calculator.js` | Unused first assignment in `square()` | Code Smell - Dead code |
| `src/calculator.js` | Empty `catch` block in `parseNumber()` | Code Smell - Silent error |
## Usage
```bash
npm install
npm run test
npm run test:coverage
```
## License
[The MIT License](https://piecioshka.mit-license.org) @ 2026