norn-cli 1.5.2 → 1.5.3

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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": 1,
3
+ "keys": {
4
+ "regression-shared": {
5
+ "value": "regression-shared-key",
6
+ "updatedAt": "2026-03-01T23:36:28.893Z"
7
+ }
8
+ }
9
+ }
@@ -3,7 +3,7 @@
3
3
  "urls": {
4
4
  "https://petstore.swagger.io/v2/swagger.json": {
5
5
  "baseUrl": "https://petstore.swagger.io/v2",
6
- "fetchedAt": "2026-02-28T21:26:57.174Z",
6
+ "fetchedAt": "2026-03-02T17:50:37.440Z",
7
7
  "schemas": [
8
8
  {
9
9
  "operationId": "AddPet",
@@ -28,6 +28,20 @@
28
28
  "assertionLine": 39,
29
29
  "status": "pass",
30
30
  "lastRunTime": "2026-02-08T20:17:12.506Z"
31
+ },
32
+ "tests/Regression/04-sequences.norn:43": {
33
+ "schemaPath": "tests/Regression/schemas/GET-users-1.schema.json",
34
+ "sourceFile": "tests/Regression/04-sequences.norn",
35
+ "assertionLine": 43,
36
+ "status": "pass",
37
+ "lastRunTime": "2026-02-28T22:28:46.376Z"
38
+ },
39
+ "tests/Regression/04-sequences.norn:51": {
40
+ "schemaPath": "tests/Regression/schemas/GET-users-1.schema.json",
41
+ "sourceFile": "tests/Regression/04-sequences.norn",
42
+ "assertionLine": 51,
43
+ "status": "pass",
44
+ "lastRunTime": "2026-02-28T22:28:03.470Z"
31
45
  }
32
46
  }
33
47
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## [1.5.3] - 2026-03-02
8
+
9
+ ### Added
10
+ - **Native Encrypted `.nornenv` Secrets (Extension + CLI)**:
11
+ - Added encrypted secret format support: `secret name = ENC[NORN_AGE_V1:kid=<id>:<payload>]`.
12
+ - Added automatic secret decryption during environment resolution for both VS Code execution and CLI runs.
13
+ - Added `norn secrets` command group: `keygen`, `import-key`, `encrypt`, `rotate`, `rekey`, `audit`, `keys`, `forget`.
14
+ - Added `.nornenv` CodeLens actions: `Encrypt Secret`, `View Decrypted`, `Rotate Secret`, `Delete Secret`.
15
+ - Added encrypted environment regression coverage with chained `.nornenv` imports.
16
+
17
+ - **TLS Certificate Verification Toggle (Extension + CLI)**:
18
+ - Added VS Code setting `norn.security.verifyTlsCertificates` (default `true`) to control TLS certificate verification for HTTPS requests and Swagger/OpenAPI fetches.
19
+ - Added CLI flag `--insecure` to disable TLS certificate verification for local/self-signed development environments.
20
+ - Wired shared runtime TLS behavior so extension request execution, CLI execution, Swagger imports, schema extraction, coverage refresh, and chat Swagger fetches use the same verification mode.
21
+
22
+ ### Improved
23
+ - **Secrets UX and Safety**:
24
+ - Added known `kid` picker so users can select previously used key IDs instead of typing each time.
25
+ - Added first-time encryption flow to generate a new shared key once (or use an existing key from vault), then cache locally.
26
+ - Improved decrypted secret display to a secure modal flow with masked preview, explicit reveal, and copy action (no plaintext editor tab).
27
+ - Added best-effort auto-ignore for `.norn-cache/` in repo `.gitignore` when secret keys are first cached.
28
+
5
29
  ## [1.5.2] - 2026-02-28
6
30
 
7
31
  ### Improved
package/README.md CHANGED
@@ -279,19 +279,19 @@ end sequence
279
279
 
280
280
  ```bash
281
281
  # Run sequences tagged @smoke
282
- npx norn tests/ --tag smoke
282
+ norn tests/ --tag smoke
283
283
 
284
284
  # AND logic: must have BOTH tags
285
- npx norn tests/ --tag smoke --tag auth
285
+ norn tests/ --tag smoke --tag auth
286
286
 
287
287
  # OR logic: match ANY tag
288
- npx norn tests/ --tags smoke,regression
288
+ norn tests/ --tags smoke,regression
289
289
 
290
290
  # Key-value exact match
291
- npx norn tests/ --tag team(CustomerExp)
291
+ norn tests/ --tag team(CustomerExp)
292
292
 
293
293
  # Combine with environment
294
- npx norn tests/ --env staging --tag smoke
294
+ norn tests/ --env staging --tag smoke
295
295
  ```
296
296
 
297
297
  **Behavior:**
@@ -532,6 +532,36 @@ var apiKey = prod-key-789
532
532
 
533
533
  Select the active environment from the VS Code status bar. Environment variables override common variables.
534
534
 
535
+ #### Encrypted Secrets in `.nornenv`
536
+
537
+ Use `secret` declarations with encrypted values so `.nornenv` can be committed safely:
538
+
539
+ ```nornenv
540
+ [env:prelive]
541
+ secret apiKey = ENC[NORN_AGE_V1:kid=team-main:...]
542
+ ```
543
+
544
+ Key flow:
545
+
546
+ ```bash
547
+ # Generate and cache a shared key once
548
+ norn secrets keygen --name team-main
549
+
550
+ # Teammates import the shared key from your vault
551
+ norn secrets import-key --kid team-main
552
+
553
+ # Encrypt plaintext secrets already in .nornenv
554
+ norn secrets encrypt --file .nornenv --env prelive --var apiKey --kid team-main
555
+
556
+ # Rotate an existing encrypted value
557
+ norn secrets rotate --file .nornenv --env prelive --var apiKey
558
+
559
+ # CI guardrail: fail on plaintext secrets
560
+ norn secrets audit .
561
+ ```
562
+
563
+ When Norn detects a locked secret with a missing key id (`kid`), it prompts once, then stores the key in `.norn-cache/secret-keys.json` (gitignored).
564
+
535
565
  ### Named Requests
536
566
 
537
567
  Define reusable requests and call them from sequences:
@@ -784,28 +814,31 @@ Run tests from the command line for CI/CD pipelines. Only sequences marked with
784
814
 
785
815
  ```bash
786
816
  # Run all test sequences in a file
787
- npx norn api-tests.norn
817
+ norn api-tests.norn
788
818
 
789
819
  # Run all test sequences in a directory (recursive)
790
- npx norn tests/
820
+ norn tests/
791
821
 
792
822
  # Run a specific sequence
793
- npx norn api-tests.norn --sequence AuthFlow
823
+ norn api-tests.norn --sequence AuthFlow
794
824
 
795
825
  # Run with a specific environment
796
- npx norn api-tests.norn --env staging
826
+ norn api-tests.norn --env staging
827
+
828
+ # Run against local/self-signed TLS endpoints (dev only)
829
+ norn api-tests.norn --insecure
797
830
 
798
831
  # Generate JUnit XML report for CI/CD
799
- npx norn tests/ --junit --output-dir ./reports
832
+ norn tests/ --junit --output-dir ./reports
800
833
 
801
834
  # Generate HTML report
802
- npx norn tests/ --html --output-dir ./reports
835
+ norn tests/ --html --output-dir ./reports
803
836
 
804
837
  # Verbose output with colors
805
- npx norn api-tests.norn -v
838
+ norn api-tests.norn -v
806
839
 
807
840
  # Show help
808
- npx norn --help
841
+ norn --help
809
842
  ```
810
843
 
811
844
  ### CLI Options
@@ -814,6 +847,7 @@ npx norn --help
814
847
  |--------|-------------|
815
848
  | `-s, --sequence <name>` | Run a specific sequence by name |
816
849
  | `-e, --env <name>` | Use a specific environment from .nornenv |
850
+ | `--insecure` | Disable TLS certificate verification (dev/self-signed endpoints only) |
817
851
  | `--tag <name>` | Filter by tag (AND logic, can repeat) |
818
852
  | `--tags <list>` | Filter by comma-separated tags (OR logic) |
819
853
  | `-j, --json` | Output results as JSON |
@@ -824,6 +858,8 @@ npx norn --help
824
858
  | `--no-fail` | Don't exit with error code on failed tests |
825
859
  | `-h, --help` | Show help message |
826
860
 
861
+ Security note: `--insecure` should only be used for local development or trusted internal test environments. Keep TLS verification enabled for staging/production endpoints.
862
+
827
863
  ## Test Explorer
828
864
 
829
865
  Run tests directly from VS Code's Testing sidebar:
@@ -898,7 +934,7 @@ jobs:
898
934
  node-version: '20'
899
935
 
900
936
  - name: Run API Tests
901
- run: npx norn ./tests/ --junit --output-dir ./reports
937
+ run: norn ./tests/ --junit --output-dir ./reports
902
938
 
903
939
  - name: Upload Test Results
904
940
  uses: actions/upload-artifact@v4
@@ -1050,6 +1086,10 @@ end sequence
1050
1086
  - `Norn: Clear Cookies` - Clear all stored cookies
1051
1087
  - `Norn: Show Stored Cookies` - Display cookies in output
1052
1088
 
1089
+ ## Extension Settings
1090
+
1091
+ - `norn.security.verifyTlsCertificates` (default: `true`) - Verify TLS certificates for HTTPS requests and Swagger/OpenAPI fetches. Disable only when testing local endpoints with self-signed certificates.
1092
+
1053
1093
  ## Requirements
1054
1094
 
1055
1095
  - VS Code 1.108.1 or higher