@drakon-systems/shieldcortex-realtime 4.53.0 → 4.54.0
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/dist/index.js +9 -0
- package/dist/interceptor.js +4 -1
- package/dist/openclaw.plugin.json +1 -1
- package/index.ts +9 -0
- package/interceptor.ts +15 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1973,6 +1973,11 @@ export async function scanLlmInput(event, _ctx) {
|
|
|
1973
1973
|
// lets the threat graph attribute taint-raising events). Metadata
|
|
1974
1974
|
// only — no content, same as the fields above.
|
|
1975
1975
|
tainted: trust.mayTaint,
|
|
1976
|
+
// Writer-side attestation (attestation Phase 4): the hook identity
|
|
1977
|
+
// above is a hardcoded literal — no conversation content can reach
|
|
1978
|
+
// it. RECORD-ONLY at the reader (attribution metadata); the JSONL
|
|
1979
|
+
// has no integrity, so this claim never feeds risk accrual.
|
|
1980
|
+
attested: true,
|
|
1976
1981
|
ts: new Date().toISOString(),
|
|
1977
1982
|
};
|
|
1978
1983
|
await auditLog(entry);
|
|
@@ -2460,6 +2465,10 @@ export async function handleBeforeAgentRun(event, ctx) {
|
|
|
2460
2465
|
decisionRowPersisted = await auditLog({
|
|
2461
2466
|
type: decision.outcome === 'unavailable' ? 'scan_unavailable' : 'threat',
|
|
2462
2467
|
hook: 'before_agent_run',
|
|
2468
|
+
// Writer-side attestation (attestation Phase 4): hook is a literal;
|
|
2469
|
+
// record-only at the reader, never an accrual input. Stamps the
|
|
2470
|
+
// scan_unavailable variant too (same object) — harmless, same claim.
|
|
2471
|
+
attested: true,
|
|
2463
2472
|
eventId,
|
|
2464
2473
|
sessionId,
|
|
2465
2474
|
model,
|
package/dist/interceptor.js
CHANGED
|
@@ -982,7 +982,10 @@ export function createInterceptor(config, pipeline, options) {
|
|
|
982
982
|
let pipelineDurationMs;
|
|
983
983
|
try {
|
|
984
984
|
const pipelineStart = Date.now();
|
|
985
|
-
|
|
985
|
+
// Identity is a plugin-code literal → attested by construction. Hostile
|
|
986
|
+
// CONTENT that BLOCKs accrues to agent:openclaw — the channel, same
|
|
987
|
+
// conduit-accrual model as the hooks; advisory soak absorbs it.
|
|
988
|
+
const result = pipeline(content, title, { type: 'agent', identifier: 'openclaw' }, undefined, undefined, { sourceAttested: true });
|
|
986
989
|
pipelineDurationMs = Date.now() - pipelineStart;
|
|
987
990
|
severity = mapSeverity(result.firewall);
|
|
988
991
|
firewallResult = result.firewall.result;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "shieldcortex-realtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.54.0",
|
|
4
4
|
"name": "ShieldCortex Real-time Scanner",
|
|
5
5
|
"description": "Real-time defence scanning on LLM input, memory extraction on LLM output, and active tool call interception with approval gating.",
|
|
6
6
|
"kind": null,
|
package/index.ts
CHANGED
|
@@ -2373,6 +2373,11 @@ export async function scanLlmInput(event: LlmInputEvent, _ctx: AgentCtx): Promis
|
|
|
2373
2373
|
// lets the threat graph attribute taint-raising events). Metadata
|
|
2374
2374
|
// only — no content, same as the fields above.
|
|
2375
2375
|
tainted: trust.mayTaint,
|
|
2376
|
+
// Writer-side attestation (attestation Phase 4): the hook identity
|
|
2377
|
+
// above is a hardcoded literal — no conversation content can reach
|
|
2378
|
+
// it. RECORD-ONLY at the reader (attribution metadata); the JSONL
|
|
2379
|
+
// has no integrity, so this claim never feeds risk accrual.
|
|
2380
|
+
attested: true,
|
|
2376
2381
|
ts: new Date().toISOString(),
|
|
2377
2382
|
};
|
|
2378
2383
|
await auditLog(entry);
|
|
@@ -2978,6 +2983,10 @@ export async function handleBeforeAgentRun(
|
|
|
2978
2983
|
decisionRowPersisted = await auditLog({
|
|
2979
2984
|
type: decision.outcome === 'unavailable' ? 'scan_unavailable' : 'threat',
|
|
2980
2985
|
hook: 'before_agent_run',
|
|
2986
|
+
// Writer-side attestation (attestation Phase 4): hook is a literal;
|
|
2987
|
+
// record-only at the reader, never an accrual input. Stamps the
|
|
2988
|
+
// scan_unavailable variant too (same object) — harmless, same claim.
|
|
2989
|
+
attested: true,
|
|
2981
2990
|
eventId,
|
|
2982
2991
|
sessionId,
|
|
2983
2992
|
model,
|
package/interceptor.ts
CHANGED
|
@@ -650,7 +650,17 @@ function xrayMemoryGuard(content: string, title?: string): XRayGuardResult {
|
|
|
650
650
|
// Field paths verified against src/defence/types.ts: trust.score (TrustScore.score),
|
|
651
651
|
// sensitivity.level (SensitivityClassification.level), fragmentation.score
|
|
652
652
|
// (FragmentationAnalysis.score; fragmentation itself is nullable).
|
|
653
|
-
type PipelineRunner = (
|
|
653
|
+
type PipelineRunner = (
|
|
654
|
+
content: string,
|
|
655
|
+
title: string,
|
|
656
|
+
source: { type: string; identifier: string },
|
|
657
|
+
// Optional trailing params of the real runDefencePipeline (config, project,
|
|
658
|
+
// options). Only options.sourceAttested is used here: the agent:openclaw
|
|
659
|
+
// identity below is a plugin-code literal, attested by construction.
|
|
660
|
+
config?: unknown,
|
|
661
|
+
project?: string,
|
|
662
|
+
options?: { sourceAttested?: boolean },
|
|
663
|
+
) => {
|
|
654
664
|
allowed: boolean;
|
|
655
665
|
firewall: {
|
|
656
666
|
result: 'ALLOW' | 'BLOCK' | 'QUARANTINE';
|
|
@@ -1363,7 +1373,10 @@ export function createInterceptor(
|
|
|
1363
1373
|
|
|
1364
1374
|
try {
|
|
1365
1375
|
const pipelineStart = Date.now();
|
|
1366
|
-
|
|
1376
|
+
// Identity is a plugin-code literal → attested by construction. Hostile
|
|
1377
|
+
// CONTENT that BLOCKs accrues to agent:openclaw — the channel, same
|
|
1378
|
+
// conduit-accrual model as the hooks; advisory soak absorbs it.
|
|
1379
|
+
const result = pipeline(content, title, { type: 'agent', identifier: 'openclaw' }, undefined, undefined, { sourceAttested: true });
|
|
1367
1380
|
pipelineDurationMs = Date.now() - pipelineStart;
|
|
1368
1381
|
severity = mapSeverity(result.firewall);
|
|
1369
1382
|
firewallResult = result.firewall.result;
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "shieldcortex-realtime",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.54.0",
|
|
4
4
|
"name": "ShieldCortex Real-time Scanner",
|
|
5
5
|
"description": "Real-time defence scanning on LLM input, memory extraction on LLM output, and active tool call interception with approval gating.",
|
|
6
6
|
"kind": null,
|
package/package.json
CHANGED