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 +19 -14
- package/dist/app.js +71 -597
- package/dist/features/filesystem.js +291 -0
- package/dist/features/terminal.js +141 -0
- package/dist/index.html +172 -165
- package/dist/security/policy.js +117 -0
- package/dist/security/reporting.js +67 -0
- package/dist/security/suites.js +281 -0
- package/dist/utils/time.js +3 -0
- package/package.json +1 -2
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
|
-
│
|
|
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
|
|
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/
|
|
175
|
-
- `
|
|
176
|
-
- `
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
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
|
|