Aribot for VS Code
Aribot is a threat modeling and security assurance platform by Ayurak. This extension brings your company's Aribot data into VS Code:
ext install aristiun.aribot-security- scan an architecture diagram and list the threats Aribot finds in it
- see findings from your company's signed gate rules on the lines you change
- preview what the security gate would say about your changes before you push
- open the fix steps for a finding, apply a suggested patch, or ask Aribot for a fix pull request
- run a compliance scan of a diagram and see its stored results
You need an Aribot account and an API key.
<!-- TODO: add screenshots (Threats view, a finding with its hover, the gate preview) once they are captured from a real workspace. -->
Sign in
- In Aribot, create an API key (Company Admin > Developer & API).
- In VS Code, open the Command Palette and run Aribot: Sign in.
- Paste the key. It is stored in VS Code secret storage, which uses your operating system's credential store where one is available. It is never written to
settings.json.
To remove the key, run Aribot: Sign out.
If you used version 2 with a key in settings.json, the extension moves it to secret storage on first start and deletes it from your settings. A key found only in a workspace's .vscode/settings.json is used only after you confirm it is yours, and it is removed from that file either way.
Features
Diagram threat scan
Right-click a diagram (.drawio, .png, .jpg, .jpeg, .vsdx, .vsd) in the Explorer and choose Aribot: Scan Diagram for Threats, or run the command from the Command Palette. Aribot uploads the file, analyses it on the server and shows its threats in the Threats view, grouped under the diagram with severity, component, description and mitigations.
Aribot: Choose Diagram lists the diagrams your company already has in Aribot and opens one in the Threats view.
File feedback in the editor
Set aribot.gateConfigId to the gate configuration of your repository's application in Aribot. When you open or save a file, Aribot shows findings from your company's rules as diagnostics on the affected lines. Hover a finding to see the rule, the related threat and component, the security requirements and why it matters.
If Aribot does not know a file yet, you see one message asking you to link the repository to an application in Aribot.
Gate preview
The status bar shows how many warnings the IDE gate reports for your changed files. Click it, or run Aribot: Check My Changes (Gate Preview), to check again. The IDE gate only warns; pull requests are checked separately by your pipeline.
Fixes
On a finding, the light bulb offers:
- Aribot: show the fix: opens the stored fix steps beside your editor.
- Aribot: apply the suggested patch: applies the patch to the open file and leaves it unsaved for your review. The patch is refused when it touches another file, creates, renames or deletes a file, or when your file no longer matches it.
- Aribot: ask for a fix pull request: asks Aribot's code review to generate the fix and open a pull request. Your repository settings in Aribot decide whether a pull request is opened. You are asked for the code review scan id and to confirm.
Compliance
Aribot: Run Compliance Scan scans the selected diagram's components against your company's compliance policies, optionally limited to AWS, Azure or Google Cloud components. The Compliance view lists the stored scans of the diagram with their scores. Opening the view does not start a scan.
Dashboard
The Dashboard view and the status bar show your company's diagram, threat and critical threat counts. While Aribot is still summarising some diagrams, the view says so, and the threat totals cover only the summarised ones.
Commands
| Command | What it does |
|---|---|
| Aribot: Sign in | Stores your API key in secret storage |
| Aribot: Sign out | Deletes the key from secret storage |
| Aribot: Scan Diagram for Threats | Uploads a diagram and shows its threats |
| Aribot: Choose Diagram | Opens one of your company's diagrams in the Threats and Compliance views |
| Aribot: Run Compliance Scan | Runs a compliance scan of the selected diagram |
| Aribot: Show Dashboard | Opens the Dashboard view |
| Aribot: Refresh | Reloads the views and the status bar |
| Aribot: Check My Changes (Gate Preview) | Asks the IDE gate about your changed files |
Settings
| Setting | Default | Description |
|---|---|---|
aribot.baseUrl | https://aribot.ayurak.com | Address of the Aribot server, host only. User settings only: a workspace cannot change it. Must use https (http is accepted for localhost). For a host outside *.ayurak.com you are asked once, per host, before your key is sent there. |
aribot.gateConfigId | 0 | Gate configuration id of the repository's application in Aribot. 0 turns file feedback and the gate preview off. |
aribot.fileFeedback | true | Ask Aribot about each file you open or save (when a gate configuration is set). |
aribot.autoScan | false | Upload a diagram for threat analysis each time you save it in VS Code. |
aribot.apiKey | No longer used. A key found here is moved to secret storage and removed. |
Privacy: what is sent to Aribot
Every request goes to aribot.baseUrl over HTTPS with your API key in the X-API-Key header.
- File feedback and the gate preview send the file's path relative to the workspace folder and the numbers of the lines changed since the last commit (from
git diff). File contents are never sent; the server refuses requests that contain them. - Diagram scan sends the whole diagram file you choose, or the file you save when
aribot.autoScanis on. - Compliance scan, dashboard, threats, fixes: diagram ids, finding references and the scan id you enter.
- Fix pull request: the code review scan id and the threat id. The fix is generated on the server.
The extension sends no telemetry. Redirects are not followed, so your key is sent only to the configured host. Failed GET requests are retried at most twice; other requests are never repeated, so an upload or a fix request runs once.
Workspace trust
In an untrusted workspace the extension:
- makes no calls to Aribot on its own: nothing is fetched when the folder opens, and file feedback and
autoScanstay off - runs no
gitcommands, so the gate preview is unavailable - ignores workspace values of
aribot.autoScan,aribot.fileFeedbackandaribot.gateConfigId
Commands you run yourself, such as a diagram scan, still work. The views load when you click Load from Aribot.
aribot.baseUrl can only be set in user settings, so a cloned repository cannot point your key at another server.
Troubleshooting
"You are not signed in": run Aribot: Sign in.
"Aribot did not accept your API key": the key is expired or was revoked. Create a new key in Aribot and sign in again.
"Your company has no licence for ...": the feature named in the message is not enabled for your company. Ask your company admin, or request access from the page the Open Aribot button opens.
"Aribot refused this request": the key's user has no access to that diagram, company or action, or the key is limited to other API paths.
"... was redirected": aribot.baseUrl points at an address that redirects. Set it to the final address, for example https://aribot.ayurak.com.
No findings appear in the editor: check that aribot.gateConfigId is set, that the workspace is trusted, and that the repository is linked to an application in Aribot. The Aribot output channel lists failed requests.
The diagram scan says it is still analysing: large diagrams take longer. Run Aribot: Refresh later; the analysis continues on the server.
Links
- Documentation: https://aribot.ayurak.com/developers/vscode/
- Issues: https://github.com/Aristiun/vscode-aribot/issues
- Aribot: https://aribot.ayurak.com
For maintainers
Build and test locally:
npm ci --ignore-scripts
npm run compile
npm test
npx vsce package --no-dependenciesReleases are published by .github/workflows/release.yml when a tag v<version> is pushed. The tag must match version in package.json. The publish job runs in the protected GitHub environment vscode-marketplace and waits for a reviewer's approval.
- Visual Studio Marketplace: published with
vsce publish --azure-credential. The job signs in to Microsoft Entra ID through GitHub OIDC (azure/loginwith a federated credential), so no Marketplace token is stored. Set the environment variablesAZURE_CLIENT_IDandAZURE_TENANT_IDto the app registration that has publish rights on thearistiunpublisher, with a federated credential for this repository and thevscode-marketplaceenvironment. - Open VSX: Open VSX has no OIDC publishing yet, so it needs a token. Store it as the secret
OVSX_PATin thevscode-marketplaceenvironment only (never as a repository secret), scoped to thearistiunnamespace. Replace it with OIDC when Open VSX supports it.