modelos-secure 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ if (existsSync(resolve(here, "wasm"))) {
23
23
  }
24
24
  // package.json
25
25
  var name = "modelos-secure";
26
- var version$1 = "0.3.0";
26
+ var version$1 = "0.3.1";
27
27
  var type = "module";
28
28
  var bin = { "modelos-secure": "dist/cli.js" };
29
29
  var exports$1 = { "./hook": "./dist/hook/hook.mjs" };
@@ -46,7 +46,7 @@ var repository = {
46
46
  var package_default = {
47
47
  name,
48
48
  version: version$1,
49
- "private": false,
49
+ "private": true,
50
50
  type,
51
51
  bin,
52
52
  exports: exports$1,
package/package.json CHANGED
@@ -1,36 +1,20 @@
1
1
  {
2
2
  "name": "modelos-secure",
3
- "version": "0.3.0",
4
- "private": false,
3
+ "version": "0.3.1",
4
+ "description": "Tests AI systems for Security, Safety and Quality. One command connects a system from its code.",
5
+ "license": "UNLICENSED",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/mn-chetan/modelos-secure.git"
9
+ },
5
10
  "type": "module",
6
11
  "bin": {
7
- "modelos-secure": "dist/cli.js"
12
+ "modelos-secure": "cli.js"
8
13
  },
9
14
  "exports": {
10
- "./hook": "./dist/hook/hook.mjs"
15
+ "./hook": "./hook/hook.mjs"
11
16
  },
12
17
  "engines": {
13
18
  "node": ">=22"
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "build": "vite build"
20
- },
21
- "dependencies": {
22
- "@modelos-secure/core": "workspace:*",
23
- "@modelos-secure/scan": "workspace:*",
24
- "@modelos-secure/schema": "workspace:*",
25
- "yaml": "2.9.1"
26
- },
27
- "devDependencies": {
28
- "vite": "8.3.6"
29
- },
30
- "description": "Tests AI systems for Security, Safety and Quality. One command connects a system from its code.",
31
- "license": "UNLICENSED",
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/mn-chetan/modelos-secure.git"
35
19
  }
36
- }
20
+ }
package/dist/README.md DELETED
@@ -1,60 +0,0 @@
1
- # modelos-secure
2
-
3
- Tests an AI system for Security, Safety and Quality. One command in the system's repository connects it, with no code changes:
4
-
5
- ```bash
6
- npx modelos-secure scan .
7
- ```
8
-
9
- It reads the code the way an engineer would, starting where the app starts, draws the system's map and asks only what it cannot work out. Everything it decides goes into `modelos-secure.yaml`.
10
-
11
- Before it sends anything it asks once whether a model may read the code it needs, or only an outline of it, or nothing. Every answer it sends passes a filter that takes secrets out, and settings files, keys and credentials are never read. `.modelos-secure/sent.jsonl` lists what was sent, `--explain` shows the outline and what may and may not be read without sending anything, and `--offline` keeps everything on your machine.
12
-
13
- At a terminal, `modelos-secure` on its own starts a session about the app in the folder: ask about it in your own words, and each answer cites the files and lines it rests on, checked against the code.
14
-
15
- | Command | Does |
16
- | --------------------------------------------- | ------------------------------------------------------------------ |
17
- | `modelos-secure` | At a terminal, a session about the app in this folder. |
18
- | `modelos-secure login` | Saves a workspace token, and signs in with Google if needed. |
19
- | `modelos-secure scan .` | Connects this repository. `--offline`, `--explain`, `--yes`. |
20
- | `modelos-secure review` | Starts a review of this system. `--quick`, `--ci`, `--budget`. |
21
- | `modelos-secure replay F-031` | Replays one finding. |
22
- | `modelos-secure doctor` | Checks the setup and fixes what it can. |
23
- | `modelos-secure runner` | Serves a review's attempts from this machine, in the app's folder. |
24
- | `modelos-secure export R-1179 --format sarif` | Writes a review's findings as SARIF or JSON. |
25
- | `modelos-secure --version` | Prints this CLI's version. |
26
-
27
- A review of an app connected by the scan reaches it through a runner on the machine that runs it. `modelos-secure review` starts one itself, and keeps it while the review is paused; a review started from the app needs `modelos-secure runner` running in the app's folder, and says so if none is. A start command is checked before it runs and saved only once the app has started with it.
28
-
29
- During a review, actions are held and never run. Outside a review the hooks do nothing. Requires Node 22 or newer. Python apps need Python 3.10 or newer.
30
-
31
- Every command says what it takes with `--help`, such as `modelos-secure scan --help`, and refuses a flag it does not take.
32
-
33
- | Exit code | Means |
34
- | --------- | -------------------------------------------------------------- |
35
- | 0 | Done. |
36
- | 1 | Something failed, or a fix check found a break. |
37
- | 2 | The command was used wrongly. |
38
- | 3 | There are questions only a person can answer, as `--ci` lists. |
39
- | 130 | Stopped with Ctrl-C. What was done is kept. |
40
-
41
- ## Signing in
42
-
43
- Copy the login command from the workspace tokens page in the app. It has the app's address and, when the app is behind Google sign-in, the Google client to sign in with:
44
-
45
- ```bash
46
- npx modelos-secure login --url <address> --client-id <client ID> --client-secret <client secret>
47
- ```
48
-
49
- Paste the workspace token when it asks. The token is never typed on the command line. Your browser then opens for you to sign in with Google. The address, the token and the Google sign-in are kept in `~/.modelos-secure/credentials.json`, readable only by you, and the sign-in is renewed as it runs out. Without `--client-id`, as on a local stack, there is no Google sign-in.
50
-
51
- When the app is reached at an IP address and its certificate is issued for a name, the login command also has `--tls-name` and that name. The CLI then connects to the address and checks the certificate against the name: its chain, its dates and the name are all still checked. `MODELOS_SECURE_TLS_NAME` does the same for one run. When something cannot be reached, the CLI says why in plain words.
52
-
53
- `MODELOS_SECURE_URL` and `MODELOS_SECURE_TOKEN` take the place of the saved address and token. `modelos-secure doctor` says who is signed in to Google, and why a request was turned away.
54
-
55
- ## In CI
56
-
57
- CI has no browser, so it signs in to Google as a service account. The service account needs IAP-secured Web App User on the app, and the client ID must be the one on the tokens page. Set `MODELOS_SECURE_URL` and `MODELOS_SECURE_TOKEN`, then one of these:
58
-
59
- - `MODELOS_SECURE_CLIENT_ID`, the client ID from the tokens page, with gcloud signed in as the service account. The CLI runs `gcloud auth print-identity-token --audiences=<client ID>` and runs it again as the token runs out, so it suits reviews of any length. It does not work with a person's own gcloud sign-in.
60
- - `MODELOS_SECURE_IAP_TOKEN`, an ID token for the service account with the client ID as its audience. It is sent as it is and never renewed, and it lasts about an hour. In GitHub Actions, `google-github-actions/auth` makes one with `token_format: id_token`, `id_token_audience` set to the client ID and `id_token_include_email: true`.
package/dist/package.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "name": "modelos-secure",
3
- "version": "0.3.0",
4
- "description": "Tests AI systems for Security, Safety and Quality. One command connects a system from its code.",
5
- "license": "UNLICENSED",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/mn-chetan/modelos-secure.git"
9
- },
10
- "type": "module",
11
- "bin": {
12
- "modelos-secure": "cli.js"
13
- },
14
- "exports": {
15
- "./hook": "./hook/hook.mjs"
16
- },
17
- "engines": {
18
- "node": ">=20"
19
- }
20
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes