pptb-standard-sample-tool 1.1.3 → 1.1.5

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.
package/README.md CHANGED
@@ -56,7 +56,10 @@ This compiles the TypeScript source in `src/` to JavaScript in `dist/`.
56
56
  ```
57
57
  html-sample/
58
58
  ├── src/
59
- └── app.ts # Main application logic (TypeScript)
59
+ ├── app.ts # Main application logic (TypeScript)
60
+ │ ├── features/ # UI feature modules (terminal, filesystem, etc.)
61
+ │ ├── security/ # Security policy + test suites
62
+ │ └── utils/ # Small reusable helpers
60
63
  ├── index.html # Main HTML file (entry point)
61
64
  ├── styles.css # Stylesheet
62
65
  ├── package.json # Package configuration
@@ -95,7 +98,7 @@ html-sample/
95
98
  - Create isolated terminal instances
96
99
  - Execute shell commands
97
100
  - Run a safe terminal security probe (non-destructive)
98
- - Run a Security Test Suite with pass/fail JSON report
101
+ - Run API-specific security test suites with pass/fail JSON reports
99
102
  - View command output
100
103
  - Close terminal when done
101
104
 
@@ -171,18 +174,20 @@ If the probe succeeds, treat that as a signal to enforce stricter host-side cont
171
174
  - Path allow-listing for filesystem APIs
172
175
  - Auditing/logging for terminal command execution
173
176
 
174
- This sample now includes policy guards in [src/app.ts](src/app.ts):
175
- - `TERMINAL_ALLOWED_COMMANDS`: explicit commands allowed to run
176
- - `TERMINAL_BLOCKED_TOKENS`: deny-list for risky command fragments
177
- - `FILE_PATH_BLOCK_LIST`: blocks sensitive filesystem locations (for example `.ssh` and `/etc/*` paths)
178
- - `executeCommandWithPolicyGuard(...)` and `readTextWithPolicyGuard(...)`: central enforcement wrappers
179
-
180
- It also includes a **Security Test Suite** button that runs non-destructive checks and emits a JSON report:
181
- - command allow-list enforcement
182
- - risky token detection
183
- - path normalization and sensitive path matching
184
- - malformed terminal event payload resilience
185
- - lightweight burst/rate handling probe
177
+ This sample now includes policy guards in [src/security/policy.ts](src/security/policy.ts):
178
+ - `getBlockedCommandReason(...)` / `getBlockedPathReason(...)`: policy decisions
179
+ - `executeCommandWithPolicyGuard(...)` / `readTextWithPolicyGuard(...)`: central enforcement wrappers
180
+
181
+ Security suites and report formatting live in:
182
+ - [src/security/suites.ts](src/security/suites.ts)
183
+ - [src/security/reporting.ts](src/security/reporting.ts)
184
+
185
+ It also includes **API-specific Security Suite** buttons plus an **All Suites** runner. Each suite emits a JSON report with per-test `severity` and a rolled-up `highestSeverity`:
186
+ - **Terminal suite:** command allow-list enforcement, multiline/control-character blocking, overlong command blocking, local-data-to-network exfil pattern blocking, burst handling
187
+ - **FileSystem suite:** absolute-path enforcement, traversal blocking, sensitive path blocking, guarded read rejection checks, API surface checks
188
+ - **Events suite:** event API presence and malformed payload resilience checks
189
+ - **Settings suite:** API surface checks, set/get roundtrip checks, optional setAll/getAll validation
190
+ - **Dataverse suite:** method surface checks and read-only runtime checks (WhoAmI/query) when connected
186
191
 
187
192
  For production PPTB host hardening, apply equivalent checks in the host process (server-side / main-process boundary), not only in tool UI code.
188
193