# Features — codescanner

Evidence date: 2026-10-18. Revision: `master` `dc201f67859ee649a7f033194f116479c99aad00` (2021-07-14, "Update snippets").

`readme.md` is empty, so it lists no features. `snippets.txt` is the only written guide. Planned features written as a roadmap: **none found**.

No feature is marked removed. History is three commits on one day. The third commit adds a scan command. It does not delete a feature.

Secrets in `snippets.txt` and the body of `sonarqubekey.pem` are not copied into this document.

## Current features (master)

| Feature | What it does | Evidence | Status |
|---|---|---|---|
| Setup runbook | Clone URL, copy scanner to `C:\sonar-scanner`, copy the bat into a code root, create a SonarQube project, run the CLI | `snippets.txt` steps 1–5 | Documented. Not executable by itself |
| Server liveness note | Check `http://79.125.106.230/sessions/new`. If down, ask Jaco to start the instance | `snippets.txt` Server Details | Documented. No health-check script |
| Saved scan commands | Five `sonar-scanner.bat` command lines for named projects | `snippets.txt` "Commands Already scanned" | Documented record. Not a scheduler |
| Project launcher | Windows bat that forces the embedded JRE, sets home to `C:\sonar-scanner`, and runs SonarScanner CLI 4.6.2.2472 | `sonar-scanner.bat` | Implemented. Jar and `java.exe` are not in git |
| Bundled launcher | Same scanner entrypoint with home taken from the script path | `sonar-scanner/bin/sonar-scanner.bat` | Implemented. Runbook does not use it |
| Scanner debug launcher | JDWP listen on port 8000, `suspend=y`, then the bundled launcher | `sonar-scanner/bin/sonar-scanner-debug.bat` | Implemented. Not in the runbook |
| Scanner defaults file | Commented `sonar.host.url` and `sonar.sourceEncoding` only | `sonar-scanner/conf/sonar-scanner.properties` | Implemented. Does not point at the Overdrive host |
| Embedded JRE metadata | AdoptOpenJDK 11.0.11+9 Windows x64, plus `jre/lib/modules` | `sonar-scanner/jre/release`, `sonar-scanner/jre/lib/modules` | Partial. No `jre/bin`, no `java.exe`, no DLLs |
| Start instance | `aws ec2 start-instances` for `i-009462d8c9b182d5a` | `start.cmd` | Implemented |
| Stop instance | `aws ec2 stop-instances` for the same id | `stop.cmd` | Implemented |
| Example launch notes | `run-instances` with AMI, `t3a.medium`, `eu-west-1`, profile `unity`, plus two external URLs | `snippets.txt` Extra | Documented notes. Not wired to a script |
| Committed private key | RSA private key file | `sonarqubekey.pem` | Present. No feature uses it. Purpose unknown |

## Completed features

Everything in the current table arrived on 2021-07-14.

| When | Commit | Change |
|---|---|---|
| 2021-07-14 11:41 UTC | `f3e7458` | Sample `.gitignore`, including `*.jar` and `*.exe` |
| 2021-07-14 13:44 +0200 | `2f01cda` | Runbook, both launchers, JRE tree, PEM, `start.cmd`, `stop.cmd`, four saved scans |
| 2021-07-14 14:08 +0200 | `dc201f6` | Clone URL no longer includes `jacooverdrive@`. Fifth saved scan added (`1fortheroadPWA`) |

"Completed" here means committed. It does not mean the scanner runs from a fresh clone. See the gap below.

## Recorded scan targets

These are labels and keys written under "Commands Already scanned". The source of those products is not in this repository.

| Label | Project key | Branch words in the label | Added |
|---|---|---|---|
| TMT - Pay My Fines | `TMTFrontend` | none | `2f01cda` |
| TMT - Backend | `TMTBackend` | none | `2f01cda` |
| My Pass - Regstartion Form | `MyPassRegistration` | Master Branch | `2f01cda` |
| My Pass - PWA | `MyPassPWA` | Prod branch | `2f01cda` |
| 1 for the road PWA | `1fortheroadPWA` | Master BranchConn | `dc201f6` |

Each command sets `sonar.sources=.`, `sonar.host.url=http://79.125.106.230`, and a `sonar.login` token. Provenance: **Documented**.

## In development

No branch other than `master`. No TODO, FIXME, or unfinished script marked as in progress. `git ls-remote --heads` on 2026-10-18 returned only `master`.

## Planned

No planned feature is written in the repository.

The sentence "New Project, name and random key" describes a manual SonarQube step, not a future code change. Provenance: **Documented**.

## Recently changed

The only change after the first content commit is `dc201f6` (2021-07-14):

- Setup step 1 URL changed from `https://jacooverdrive@bitbucket.org/overdrive/codescanner.git` to `https://bitbucket.org/overdrive/codescanner.git`.
- A separator line was added before "Extra".
- The `1fortheroadPWA` command was appended.

No commit since that date. "Recently" relative to 2026-10-18: nothing.

## Deprecated or removed

No removed feature is visible in the three-commit history.

`sonar-scanner/conf/sonar-scanner.properties` still shows the upstream example host `http://localhost:9000`, commented out. That is the stock file, not a retired Overdrive setting. Provenance: **Implemented**.

## Gaps that look like missing features

| Gap | What the tree shows | Provenance |
|---|---|---|
| Scanner cannot start from git | Classpath jar `sonar-scanner-cli-4.6.2.2472.jar` is named and not committed. `lib/` does not exist. `jre/bin/java.exe` does not exist. `.gitignore` ignores `*.jar` and `*.exe` | **Implemented** ignore rules. Absence verified on `dc201f6` |
| No per-project properties file | Issue discovery listed `sonar-project.properties`. It is not in `dc201f6`. Scans pass properties on the command line | **Unknown** for the missing file. Command-line form **Documented** |
| No `sonarqube_scan.bat` | Listed at discovery, absent from `dc201f6` | **Unknown** |
| Private key unused | `sonarqubekey.pem` is an RSA key. No script names it | **Implemented** file. Behaviour **Unknown** |
| Start/stop ignore region and profile | Example launch uses `eu-west-1` and profile `unity`. `start.cmd` and `stop.cmd` do not | **Documented** versus **Implemented** |
| Empty readme | `readme.md` is 0 bytes, added in `2f01cda` | **Implemented** |

## Source locations

| Path | Role |
|---|---|
| `snippets.txt` | Runbook, server note, saved scans, AWS notes |
| `readme.md` | Empty |
| `sonar-scanner.bat` | Launcher copied into target repositories |
| `sonar-scanner/bin/sonar-scanner.bat` | Launcher relative to the scanner install |
| `sonar-scanner/bin/sonar-scanner-debug.bat` | Debug launcher |
| `sonar-scanner/conf/sonar-scanner.properties` | Commented defaults |
| `sonar-scanner/jre/release` | JRE version identity |
| `start.cmd` | Start EC2 instance |
| `stop.cmd` | Stop EC2 instance |
| `sonarqubekey.pem` | RSA private key |
| `.gitignore` | Sample ignores, including jars and executables |
