@blogic-cz/agent-tools 1.5.7 → 1.5.9
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 +21 -8
- package/dist/az-tool/service.d.ts.map +1 -1
- package/dist/azdo-tool/service.d.ts.map +1 -1
- package/dist/credential-guard/index.d.ts +2 -0
- package/dist/credential-guard/index.d.ts.map +1 -1
- package/dist/db-tool/service.d.ts.map +1 -1
- package/dist/gh-tool/gist.d.ts +13 -0
- package/dist/gh-tool/gist.d.ts.map +1 -1
- package/dist/gh-tool/pr/core.d.ts.map +1 -1
- package/dist/gh-tool/pr/review.d.ts.map +1 -1
- package/dist/gh-tool/release.d.ts +46 -1
- package/dist/gh-tool/release.d.ts.map +1 -1
- package/dist/gh-tool/text-input.d.ts +5 -3
- package/dist/gh-tool/text-input.d.ts.map +1 -1
- package/dist/k8s-tool/service.d.ts.map +1 -1
- package/dist/logs-tool/main.d.ts +1 -2
- package/dist/logs-tool/main.d.ts.map +1 -1
- package/dist/observability-tool/shared.d.ts.map +1 -1
- package/dist/session-tool/main.d.ts +1 -2
- package/dist/session-tool/main.d.ts.map +1 -1
- package/dist/shared/audit.d.ts.map +1 -1
- package/dist/shared/content-security.d.ts +6 -0
- package/dist/shared/content-security.d.ts.map +1 -0
- package/dist/shared/credential-patterns.d.ts +11 -0
- package/dist/shared/credential-patterns.d.ts.map +1 -0
- package/dist/shared/effect-version.d.ts.map +1 -1
- package/dist/shared/error-renderer.d.ts.map +1 -1
- package/dist/shared/format.d.ts.map +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/output-boundary.d.ts +3 -0
- package/dist/shared/output-boundary.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/audit-tool/main.ts +3 -1
- package/src/az-tool/main.ts +3 -1
- package/src/az-tool/service.ts +9 -0
- package/src/azdo-tool/main.ts +3 -1
- package/src/azdo-tool/service.ts +17 -0
- package/src/credential-guard/claude-hook.ts +2 -1
- package/src/credential-guard/index.ts +936 -87
- package/src/db-tool/main.ts +3 -1
- package/src/db-tool/service.ts +25 -2
- package/src/gh-tool/gist.ts +63 -64
- package/src/gh-tool/main.ts +3 -1
- package/src/gh-tool/pr/core.ts +10 -3
- package/src/gh-tool/pr/review.ts +199 -12
- package/src/gh-tool/release.ts +104 -29
- package/src/gh-tool/text-input.ts +19 -38
- package/src/k8s-tool/main.ts +3 -1
- package/src/k8s-tool/service.ts +25 -0
- package/src/logs-tool/main.ts +7 -2
- package/src/observability-tool/main.ts +5 -7
- package/src/observability-tool/shared.ts +41 -1
- package/src/session-tool/main.ts +18 -3
- package/src/shared/audit.ts +11 -10
- package/src/shared/content-security.ts +91 -0
- package/src/shared/credential-patterns.ts +62 -0
- package/src/shared/effect-version.ts +2 -1
- package/src/shared/error-renderer.ts +15 -2
- package/src/shared/format.ts +33 -6
- package/src/shared/index.ts +5 -0
- package/src/shared/output-boundary.ts +29 -0
package/README.md
CHANGED
|
@@ -595,7 +595,7 @@ export AGENT_TOOLS_DB_PASSWORD="your-password"
|
|
|
595
595
|
export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
|
|
596
596
|
```
|
|
597
597
|
|
|
598
|
-
The
|
|
598
|
+
The wrappers check outgoing user content and redact recognized credentials in agent-facing output, errors, and audit records. Detection uses credential patterns and exact values of sensitive process environment variables of at least eight characters. Unknown credentials and transformed or encoded values may evade detection.
|
|
599
599
|
|
|
600
600
|
## Credential Guard
|
|
601
601
|
|
|
@@ -608,6 +608,14 @@ The guard blocks agents from accessing sensitive files, leaking secrets, and run
|
|
|
608
608
|
- Dangerous shell patterns (`printenv`, `cat .env`, etc.)
|
|
609
609
|
- Direct CLI usage (`gh`, `kubectl`, `psql`, `az`) — must use wrapper tools
|
|
610
610
|
|
|
611
|
+
### Content checks in wrappers
|
|
612
|
+
|
|
613
|
+
GitHub text and file publication, database queries, Azure and Kubernetes command arguments, and observability requests are checked before execution. GitHub file uploads use snapshots of the inspected bytes. Generated release notes and existing pending reviews or draft releases are inspected before publication. Authentication headers and connection credentials remain inside the tools.
|
|
614
|
+
|
|
615
|
+
Results retain their JSON or TOON structure, with detected credentials replaced by `[REDACTED]`. Audit records are sanitized before storage; reading older records also sanitizes the returned content but does not rewrite the database.
|
|
616
|
+
|
|
617
|
+
These checks apply to these wrappers. They do not intercept arbitrary shell programs or other agent tools. GitHub does not offer an atomic content-version condition for submitting pending reviews or publishing existing drafts, so a concurrent remote edit between inspection and publication remains possible.
|
|
618
|
+
|
|
611
619
|
### Setup for Claude Code
|
|
612
620
|
|
|
613
621
|
Claude Code uses shell command hooks. The package ships a ready-made wrapper script.
|
|
@@ -634,14 +642,19 @@ Claude Code uses shell command hooks. The package ships a ready-made wrapper scr
|
|
|
634
642
|
|
|
635
643
|
That's it. The hook reads tool input from stdin, runs the guard, and exits with code 2 (blocked + reason on stderr) or 0 (allowed).
|
|
636
644
|
|
|
637
|
-
The guard permits static `printenv` reads and simple `echo`/`printf` expansions only for exact names in `credentialGuard.allowedEnvironmentVariables`. The default list is empty. Multiple names are allowed only when each name is approved.
|
|
645
|
+
The guard permits static `printenv` reads and simple `echo`/`printf` expansions only for exact names in `credentialGuard.allowedEnvironmentVariables`. The default list is empty. Multiple names are allowed only when each name is approved. Approved environment values may be displayed, but redirecting their pipeline or passing them to an executor stays blocked.
|
|
646
|
+
|
|
647
|
+
Literal assignments such as `F=README.md; cat "$F"` work in supported static commands. Bounded proofs also support a literal `for` loop over a fixed list, the adjacent `cd PATH && T=LITERAL && git add -- "$T/file"` form, and `rg -n PATTERN src/{a,b}` with a single literal path-brace component. Loop binders are a single lowercase letter or `T`, and their uses must occupy supported data operands. Every body command and expanded path is checked; unsupported control flow, mutations such as `printf -v`, and unknown command roles cannot establish the proof. Other variable assignments and brace expansions retain conservative refusal. Fully quoted literal braces remain usable in static searches.
|
|
648
|
+
|
|
638
649
|
Ordinary navigation operands such as `cd "$HOME"` and `git -C "$WORKTREE_ROOT" status --short` do not need display permission. This does not authorize printing those values, using them as code/options, or reading unknown file paths. In `printf`, approved values belong in data arguments after a fixed nonmutating format, for example `printf -- '%s' "$WORKSPACE_LABEL"`.
|
|
639
|
-
|
|
640
|
-
Literal environment-command text in `rg`, `grep`, `git grep`, `echo`, and `printf` is allowed.
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
Single literal `echo`/`printf` writes with output redirection and single `cat`/`tee` heredoc writes are allowed. Heredoc braces are data.
|
|
650
|
+
|
|
651
|
+
The guard recognizes `rtk`, `rtk proxy`, `command`, and supported `env` prefixes and checks commands in pipelines and chains. Quoted filenames, comments, and redirects retain sensitive-path checks. Jq object selectors and inline awk programs qualify only when their actual program and options establish passive behavior. Literal environment-command text in `rg`, `grep`, `git grep`, `echo`, and `printf` is allowed only with supported command roles and passive pipeline consumers. Environment-source evidence and startup identity checks also apply to the complete original invocation. Custom dangerous-command patterns apply to both the original input and proved expansions.
|
|
652
|
+
|
|
653
|
+
Paths are checked against sensitive filename patterns and configured path rules. Supported proofs apply those checks to their expanded operands. Ordinary parent-directory and absolute paths may be allowed; the guard does not resolve filesystem paths or symlinks, or enforce repository confinement.
|
|
654
|
+
|
|
655
|
+
Single literal `echo`/`printf` writes with output redirection and single `cat`/`tee` heredoc writes are allowed. Heredoc braces are data. Use a quoted delimiter for literal code; unquoted heredocs containing `$`, backticks, or backslashes do not receive the literal-write exception. The exception permits only supported combinations with navigation or selected inspections; unsupported following commands remain outside it. Supported complete Python stdin heredocs are checked as inline programs, with the normal runtime-argument, path, execution, and environment checks.
|
|
656
|
+
|
|
657
|
+
A separate bounded Node proof supports literal `package.json` inventory loops that print `bin` metadata or use the supported scripts filter. The complete invocation must preserve loader identity through known passive commands, closed literal writers, or proved inventories. Startup/environment mutations, unknown commands, loader changes, and other dynamic loading remain unproved and are refused.
|
|
645
658
|
|
|
646
659
|
### Setup for OpenCode
|
|
647
660
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/az-tool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAkB,MAAM,QAAQ,CAAC;AAIhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG3F,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/az-tool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAkB,MAAM,QAAQ,CAAC;AAIhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG3F,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;AAUvD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB,CAAC;;yBAKuB,CACnB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAChB,eAAe,EACf,eAAe,GAAG,cAAc,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CAClF;4BACuB,CACtB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,cAAc,GAAG,cAAc,CAAC;;AAbjF,qBAAa,SAAU,SAAQ,cAeF;IAC3B,MAAM,CAAC,QAAQ,CAAC,KAAK,yFA8KnB;CACH;AAED,eAAO,MAAM,cAAc,wFAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/azdo-tool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAkB,MAAM,QAAQ,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/azdo-tool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAkB,MAAM,QAAQ,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;;yBAO9B,CACnB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAChB,MAAM,EACN,iBAAiB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,cAAc,CACzE;wBACmB,CAClB,MAAM,EAAE,YAAY,KACjB,MAAM,CAAC,MAAM,CAChB,OAAO,EACP,iBAAiB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,cAAc,CACzE;;AAfL,qBAAa,WAAY,SAAQ,gBAiBF;IAC7B,MAAM,CAAC,QAAQ,CAAC,KAAK,2FAmOnB;CACH;AAED,eAAO,MAAM,gBAAgB,0FAAoB,CAAC"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* at infrastructure level (K8s RBAC, file permissions, etc.)
|
|
15
15
|
*/
|
|
16
16
|
import type { CredentialGuardConfig } from "#config/types";
|
|
17
|
+
export { findSecretMatches } from "#shared/credential-patterns";
|
|
18
|
+
export { redactSensitiveText } from "#shared/content-security";
|
|
17
19
|
/** Input format received by hooks/plugins. */
|
|
18
20
|
export type HookInput = {
|
|
19
21
|
tool: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credential-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credential-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAI5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM/D,8CAA8C;AAC9C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,CAAC;AAQF,+CAA+C;AAC/C,MAAM,MAAM,eAAe,GAAG;IAC5B,uBAAuB,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE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AC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAuxEjB,CAAC;AAExD,yEAAyE;AACzE,eAAO,MAAM,aAAa,aAzxEE,MAAM,KAAK,OAyxEgB,CAAC;AAExD,yDAAyD;AACzD,eAAO,MAAM,aAAa,aA3xEE,MAAM,KAAK,OA2xEgB,CAAC;AAExD,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,YA7xEC,MAAM,KAAK,OA6xE0B,CAAC;AAE1E,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,YA/xEC,MAAM,KAAK;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IA+xEf,CAAC;AAEhE,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,YAjyEC,MAAM,KAAK,OAiyEsB,CAAC;AAElE,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,YAnyEC,MAAM,KAAK,MAAM,GAAG,IAmyEa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/db-tool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAS,OAAO,EAAY,MAAM,EAAE,KAAK,EAAuB,MAAM,QAAQ,CAAC;AAEtF,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/db-tool/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAS,OAAO,EAAY,MAAM,EAAE,KAAK,EAAuB,MAAM,QAAQ,CAAC;AAEtF,OAAO,KAAK,EAAE,QAAQ,EAAE,m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,CAAC;;2BAK3B,CACrB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC;iCACX,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,KAAK,CAAC,EAAE,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC;;AAZ5C,qBAAa,SAAU,SAAQ,cAcF;IAC3B,MAAM,CAAC,QAAQ,CAAC,KAAK,yHA6vBnB;CACH"}
|
package/dist/gh-tool/gist.d.ts
CHANGED
|
@@ -46,6 +46,11 @@ type GistCreateResult = {
|
|
|
46
46
|
public: boolean;
|
|
47
47
|
files: string[];
|
|
48
48
|
};
|
|
49
|
+
type GistEditResult = {
|
|
50
|
+
edited: true;
|
|
51
|
+
id: string;
|
|
52
|
+
changes: string[];
|
|
53
|
+
};
|
|
49
54
|
export declare const toGistDetail: (gist: GistApi, opts: {
|
|
50
55
|
filename: string | null;
|
|
51
56
|
withContent: boolean;
|
|
@@ -63,6 +68,14 @@ export declare const createGist: (opts: {
|
|
|
63
68
|
description: string | null;
|
|
64
69
|
public: boolean;
|
|
65
70
|
}) => Effect.Effect<GistCreateResult, import("./service").GhError, GitHubService>;
|
|
71
|
+
export declare const editGist: (opts: {
|
|
72
|
+
id: string;
|
|
73
|
+
description: string | null;
|
|
74
|
+
add: string | null;
|
|
75
|
+
remove: string | null;
|
|
76
|
+
filename: string | null;
|
|
77
|
+
sourcePath: string | null;
|
|
78
|
+
}) => Effect.Effect<GistEditResult, import("./service").GhError, GitHubService | import("effect/Scope").Scope>;
|
|
66
79
|
export declare const gistListCommand: Command.Command<"list", {
|
|
67
80
|
readonly format: "json" | "toon";
|
|
68
81
|
readonly limit: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gist.d.ts","sourceRoot":"","sources":["../../src/gh-tool/gist.ts"],"names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IAAI;YAClB,OAAO;iFAiDf,CAAC;AAEH,eAAO,MAAM,QAAQ;QACf,MAAM;iBACG,MAAM,GAAG,IAAI;SACrB,MAAM,GAAG,IAAI;YACV,MAAM,GAAG,IAAI;cACX,MAAM,GAAG,IAAI;gBACX,MAAM,GAAG,IAAI;8GA6CzB,CAAC;AA2BH,eAAO,MAAM,eAAe;;;;kDAqBgE,CAAC;AAE7F,eAAO,MAAM,eAAe;;;;;kDAwBqC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;kDA0EmE,CAAC;AAElG,eAAO,MAAM,eAAe;;;;;;;;;kDAiFmE,CAAC;AAEhG,eAAO,MAAM,iBAAiB;;;;kDAgBiE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/pr/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,EAAkB,MAAM,QAAQ,CAAC;AAE1E,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,iBAAiB,EAEjB,WAAW,EACX,aAAa,EACb,MAAM,EAGN,iBAAiB,EAIlB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/pr/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,EAAkB,MAAM,QAAQ,CAAC;AAE1E,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,iBAAiB,EAEjB,WAAW,EACX,aAAa,EACb,MAAM,EAGN,iBAAiB,EAIlB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,M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O;qBAAmB,MAAM;gGAwLnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/pr/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAEV,YAAY,EAGZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EAEb,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/pr/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAEV,YAAY,EAGZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EAEb,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAye5C;;;GAGG;AACH,eAAO,MAAM,YAAY,gMAcvB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,uKAoCxB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,8KAmC7B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY,+NA+CvB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;gDAaxB,CAAC;AAEH,eAAO,MAAM,uBAAuB,6JAgBlC,CAAC;AAEH,eAAO,MAAM,gBAAgB,gHA0C3B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;gDA4CjC,CAAC;AAeH;;GAEG;AACH,eAAO,MAAM,cAAc;;;gDA4FzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;gDA0FjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;gDAWxB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAgCzD;;;GAGG;AACH,eAAO,MAAM,YAAY;QACnB,MAAM,GAAG,IAAI;WACV,WAAW;UACZ,MAAM;aACH,OAAO;;;;;;;gDAmDhB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;gDAyM9B,CAAC;AAeH,eAAO,MAAM,sBAAsB;;;;gDA8CjC,CAAC"}
|
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
import { Command } from "effect/unstable/cli";
|
|
2
|
-
import { Option } from "effect";
|
|
2
|
+
import { Effect, Option } from "effect";
|
|
3
|
+
import { GitHubCommandError } from "#gh/errors";
|
|
3
4
|
import { GitHubService } from "./service";
|
|
5
|
+
type ReleaseCreateResult = {
|
|
6
|
+
created: true;
|
|
7
|
+
tagName: string;
|
|
8
|
+
name: string;
|
|
9
|
+
url: string;
|
|
10
|
+
isDraft: boolean;
|
|
11
|
+
isPrerelease: boolean;
|
|
12
|
+
};
|
|
13
|
+
type ReleaseEditResult = {
|
|
14
|
+
edited: true;
|
|
15
|
+
tagName: string;
|
|
16
|
+
name: string;
|
|
17
|
+
url: string;
|
|
18
|
+
isDraft: boolean;
|
|
19
|
+
isPrerelease: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const resolveCreateNotes: (opts: {
|
|
22
|
+
body: string | null;
|
|
23
|
+
bodyFile: string | null;
|
|
24
|
+
notesFile: string | null;
|
|
25
|
+
}) => Effect.Effect<string | null, GitHubCommandError, never>;
|
|
26
|
+
export declare const createRelease: (opts: {
|
|
27
|
+
tag: string;
|
|
28
|
+
title: string | null;
|
|
29
|
+
body: string | null;
|
|
30
|
+
draft: boolean;
|
|
31
|
+
prerelease: boolean;
|
|
32
|
+
generateNotes: boolean;
|
|
33
|
+
notesStartTag: string | null;
|
|
34
|
+
target: string | null;
|
|
35
|
+
verifyTag: boolean;
|
|
36
|
+
latest: boolean | null;
|
|
37
|
+
repo: string | null;
|
|
38
|
+
}) => Effect.Effect<ReleaseCreateResult, import("./service").GhError, GitHubService>;
|
|
39
|
+
export declare const editRelease: (opts: {
|
|
40
|
+
tag: string;
|
|
41
|
+
title: string | null;
|
|
42
|
+
body: string | null;
|
|
43
|
+
draft: boolean | null;
|
|
44
|
+
prerelease: boolean | null;
|
|
45
|
+
latest: boolean | null;
|
|
46
|
+
repo: string | null;
|
|
47
|
+
}) => Effect.Effect<ReleaseEditResult, import("./service").GhError, GitHubService>;
|
|
4
48
|
export declare const releaseCreateCommand: Command.Command<"create", {
|
|
5
49
|
readonly body: Option.Option<string>;
|
|
6
50
|
readonly bodyFile: Option.Option<string>;
|
|
@@ -49,4 +93,5 @@ export declare const releaseStatusCommand: Command.Command<"status", {
|
|
|
49
93
|
readonly format: "json" | "toon";
|
|
50
94
|
readonly repo: Option.Option<string>;
|
|
51
95
|
}, {}, import("./service").GhError, GitHubService>;
|
|
96
|
+
export {};
|
|
52
97
|
//# sourceMappingURL=release.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/gh-tool/release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/gh-tool/release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAuC1C,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,IAAI,CAAC;IACd,OA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A6BiE,CAAC;AAEnG,eAAO,MAAM,oBAAoB;;;kDAckE,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
2
|
import { GitHubCommandError } from "#gh/errors";
|
|
3
|
+
export { unsafeOutboundTextReason } from "#shared/content-security";
|
|
3
4
|
declare const MissingMode: Schema.Literals<readonly ["error", "null", "default"]>;
|
|
4
5
|
export declare const isSensitivePath: (filePath: string) => boolean;
|
|
5
|
-
/** Inspect the final text, after shell expansion and after reading files or stdin. */
|
|
6
|
-
export declare function unsafeOutboundTextReason(text: string, environment?: Record<string, string | undefined>): string | null;
|
|
7
6
|
export declare const validateOutboundText: (text: string, command: string) => Effect.Effect<string, never, never> | Effect.Effect<never, GitHubCommandError, never>;
|
|
7
|
+
export declare const readValidatedOutboundFile: (filePath: string, command: string) => Effect.Effect<{
|
|
8
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
9
|
+
text: string;
|
|
10
|
+
}, GitHubCommandError, never>;
|
|
8
11
|
export declare const validateOutboundFile: (filePath: string, command: string) => Effect.Effect<void, GitHubCommandError, never>;
|
|
9
12
|
type ResolveTextInputOptions = {
|
|
10
13
|
command: string;
|
|
@@ -23,5 +26,4 @@ export declare const resolveOptionalTextInput: (options: Omit<ResolveTextInputOp
|
|
|
23
26
|
export declare const resolveDefaultTextInput: (options: Omit<ResolveTextInputOptions, "missingMode" | "missingValue"> & {
|
|
24
27
|
defaultValue: string;
|
|
25
28
|
}) => Effect.Effect<string, GitHubCommandError>;
|
|
26
|
-
export {};
|
|
27
29
|
//# sourceMappingURL=text-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/gh-tool/text-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src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,eAAO,MAAM,uBAAuB,YACzB,IAAI,CAAC,uBAAuB,EAAE,aAAa,GAAG,cAAc,CAAC,GAAG;IACvE,YAAY,EAAE,MAAM,CAAC;CACtB,KACA,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAKsD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/k8s-tool/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAe,MAAM,QAAQ,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EACL,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/k8s-tool/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAe,MAAM,QAAQ,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EACL,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;;yBAgB9B,CACnB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,WAAW,EAChB,OAAO,CAAC,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAChB,MAAM,EACN,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,wBAAwB,CAC/E;yBACoB,CACnB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAChB,aAAa,EACb,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,wBAAwB,CAC/E;yBACoB,CACnB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,KACb,MAAM,CAAC,MAAM,CAChB,aAAa,EACb,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,wBAAwB,CAC/E;;AA5BL,qBAAa,UAAW,SAAQ,eA8BF;IAC5B,MAAM,CAAC,QAAQ,CAAC,KAAK,0FAmdnB;CACH;AAED,eAAO,MAAM,eAAe,yFAAmB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/logs-tool/main.d.ts
CHANGED
|
@@ -12,10 +12,9 @@
|
|
|
12
12
|
* Always start with --list to see available log files.
|
|
13
13
|
* Use --format toon for LLM-optimized output (fewer tokens).
|
|
14
14
|
*/
|
|
15
|
-
import { Command } from "effect/unstable/cli";
|
|
16
15
|
import { Effect } from "effect";
|
|
17
16
|
import { ConfigService } from "#config";
|
|
18
17
|
import { LogsConfigError } from "./errors";
|
|
19
18
|
import { LogsService } from "./service";
|
|
20
|
-
export declare const run: (
|
|
19
|
+
export declare const run: (args: ReadonlyArray<string>) => Effect.Effect<void, LogsConfigError | import("effect/unstable/cli/CliError").CliError, import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner | ConfigService | import("effect/FileSystem").FileSystem | LogsService | import("effect/Path").Path | import("effect/Stdio").Stdio | import("effect/Terminal").Terminal>;
|
|
21
20
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/logs-tool/main.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/logs-tool/main.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,MAAM,EAAyB,MAAM,QAAQ,CAAC;AAcvD,OAAO,EAAE,aAAa,EAA6C,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,eAAe,EAAsD,MAAM,UAAU,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAoB,MAAM,WAAW,CAAC;AA2M1D,eAAO,MAAM,GAAG,SAAU,aAAa,CAAC,MAAM,CAAC,8UAC6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/observability-tool/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;AAGvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/observability-tool/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAiB,MAAM,SAAS,CAAC;AAGvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAEf,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAOjB,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAe/D;AAED,eAAO,MAAM,SAAS,mBAGrB,CAAC;AAEF,eAAO,MAAM,aAAa,kCAMzB,CAAC;AAkCF;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,sBAAsB,GAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAU/C;AAyDD,eAAO,MAAM,aAAa,QAAS,MAAM,WAAW,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,iFA4BrE,CAAC;AAEL,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAWpD;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,WAAW,GACjB,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,sBAAsB,CAAC,CAgE1C;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,sBAAsB,EAC9B,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,YAAY,GAAG,MAAM,EACrC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,sBAAsB,CAAC,CAkCxD"}
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* Lists, searches, and reads OpenCode session history.
|
|
6
6
|
* Uses current project scope by default, or all projects with --all.
|
|
7
7
|
*/
|
|
8
|
-
import { Command } from "effect/unstable/cli";
|
|
9
8
|
import { Effect } from "effect";
|
|
10
9
|
import { ResolvedPaths } from "./config";
|
|
11
10
|
import { SessionService } from "./service";
|
|
12
|
-
export declare const run: (
|
|
11
|
+
export declare const run: (args: ReadonlyArray<string>) => Effect.Effect<void, import("effect/unstable/cli/CliError").CliError, import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem | import("effect/Path").Path | ResolvedPaths | SessionService | import("effect/Stdio").Stdio | import("effect/Terminal").Terminal>;
|
|
13
12
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/session-tool/main.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/session-tool/main.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAIH,OAAO,EAAE,MAAM,EAAiB,MAAM,QAAQ,CAAC;AAgB/C,OAAO,EAAE,aAAa,EAAsB,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAc,cAAc,EAAuB,MAAM,WAAW,CAAC;AAqT5E,eAAO,MAAM,GAAG,SAAU,aAAa,CAAC,MAAM,CAAC,+TAC6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/shared/audit.ts"],"names":[],"mappings":"AAKA,OAAO,EAAS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/shared/audit.ts"],"names":[],"mappings":"AAKA,OAAO,EAAS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQvD,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO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string, string | undefined>): string | null;
|
|
2
|
+
/** Remove recognized secret spans and known sensitive process-environment values. */
|
|
3
|
+
export declare function redactSensitiveText(text: string, environment?: Record<string, string | undefined>): string;
|
|
4
|
+
/** Sanitize values before serialization so JSON and TOON retain their structure. */
|
|
5
|
+
export declare function redactSensitiveValue<T>(value: T, environment?: Record<string, string | undefined>): T;
|
|
6
|
+
//# sourceMappingURL=content-security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-security.d.ts","sourceRoot":"","sources":["../../src/shared/content-security.ts"],"names":[],"mappings":"AAiBA,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAC5D,MAAM,GAAG,IAAI,CAcf;AAED,qFAAqF;AACrF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAC5D,MAAM,CAuBR;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,EACR,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAC5D,CAAC,CAqBH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Patterns used by the credential guard and shared output redaction. */
|
|
2
|
+
export declare const SECRET_PATTERNS: {
|
|
3
|
+
name: string;
|
|
4
|
+
pattern: RegExp;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function findSecretMatches(content: string): Array<{
|
|
7
|
+
name: string;
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=credential-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-patterns.d.ts","sourceRoot":"","sources":["../../src/shared/credential-patterns.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,eAAe;;;GAqC3B,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,GACd,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect-version.d.ts","sourceRoot":"","sources":["../../src/shared/effect-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect-version.d.ts","sourceRoot":"","sources":["../../src/shared/effect-version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,QAA8B,CAAC;AAEhE,eAAO,MAAM,kBAAkB,YAAa,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAOzE,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,OAAO,CAe1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-renderer.d.ts","sourceRoot":"","sources":["../../src/shared/error-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAE,KAAK,EAAW,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"error-renderer.d.ts","sourceRoot":"","sources":["../../src/shared/error-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAE,KAAK,EAAW,MAAM,QAAQ,CAAC;AAoExC,eAAO,MAAM,mBAAmB,UAAW,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/shared/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/shared/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD,eAAO,MAAM,YAAY,4BAGxB,CAAC;AAEF,wBAAgB,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,CAK1F;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,CAKlE;AAiCD,eAAO,MAAM,OAAO,SAAU,MAAM,2CAShC,CAAC;AAEL,eAAO,MAAM,YAAY,GAAI,CAAC,QAAQ,CAAC,UAAU,YAAY,2CAAqC,CAAC"}
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { formatAny, formatOption, formatOutput, logFormatted, logText } from "./
|
|
|
3
3
|
export { expandPath, runCommand } from "./bun";
|
|
4
4
|
export { commonArgOptions, parseCommonArgs } from "./cli";
|
|
5
5
|
export { renderCauseToStderr } from "./error-renderer";
|
|
6
|
+
export { redactSensitiveText, redactSensitiveValue, unsafeOutboundTextReason, } from "./content-security";
|
|
6
7
|
export { dumpCommandSchema, makeSchemaCommand, type CommandSchema } from "./schema-dump";
|
|
7
8
|
export declare const VERSION: string;
|
|
8
9
|
export { execEffect, renderCommandLine, tokenizeCommandLine, type ExecError } from "./exec";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sh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O,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-boundary.d.ts","sourceRoot":"","sources":["../../src/shared/output-boundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAOnD,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2FAqBvE,CAAC"}
|
package/package.json
CHANGED
package/src/audit-tool/main.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
VERSION,
|
|
13
13
|
} from "#shared";
|
|
14
14
|
import { AuditService, AuditServiceLayer, withAudit } from "#shared/audit";
|
|
15
|
+
import { withRedactedOutput } from "#shared/output-boundary";
|
|
15
16
|
|
|
16
17
|
type AuditToolResult<T> = {
|
|
17
18
|
success: boolean;
|
|
@@ -97,11 +98,12 @@ const mainCommand = Command.make("audit-tool", {}).pipe(
|
|
|
97
98
|
|
|
98
99
|
const cli = Command.run(mainCommand, {
|
|
99
100
|
version: VERSION,
|
|
101
|
+
renderErrors: false,
|
|
100
102
|
});
|
|
101
103
|
|
|
102
104
|
const MainLayer = AuditServiceLayer.pipe(Layer.provideMerge(BunServices.layer));
|
|
103
105
|
|
|
104
|
-
const program = withAudit("audit", cli).pipe(
|
|
106
|
+
const program = withRedactedOutput(withAudit("audit", cli)).pipe(
|
|
105
107
|
Effect.provide(MainLayer),
|
|
106
108
|
Effect.tapCause(renderCauseToStderr),
|
|
107
109
|
);
|
package/src/az-tool/main.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
VERSION,
|
|
13
13
|
} from "#shared";
|
|
14
14
|
import { AuditServiceLayer, withAudit } from "#shared/audit";
|
|
15
|
+
import { withRedactedOutput } from "#shared/output-boundary";
|
|
15
16
|
import { AzService, AzServiceLayer } from "./service";
|
|
16
17
|
import { ConfigServiceLayer } from "#config";
|
|
17
18
|
|
|
@@ -135,6 +136,7 @@ Raw az wrapper:
|
|
|
135
136
|
|
|
136
137
|
const cli = Command.run(mainCommand, {
|
|
137
138
|
version: VERSION,
|
|
139
|
+
renderErrors: false,
|
|
138
140
|
});
|
|
139
141
|
|
|
140
142
|
const MainLayer = AzServiceLayer.pipe(
|
|
@@ -143,7 +145,7 @@ const MainLayer = AzServiceLayer.pipe(
|
|
|
143
145
|
Layer.provideMerge(AuditServiceLayer),
|
|
144
146
|
);
|
|
145
147
|
|
|
146
|
-
const program = withAudit("az", cli).pipe(
|
|
148
|
+
const program = withRedactedOutput(withAudit("az", cli)).pipe(
|
|
147
149
|
Effect.provide(MainLayer),
|
|
148
150
|
Effect.tapCause(renderCauseToStderr),
|
|
149
151
|
);
|
package/src/az-tool/service.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { isAzCommandAllowed } from "./security";
|
|
|
11
11
|
import { ConfigService, getToolConfig } from "#config";
|
|
12
12
|
import { missingBinaryFromSpawnFailure } from "#shared/binary-preflight";
|
|
13
13
|
import { renderCommandLine } from "#shared/exec";
|
|
14
|
+
import { unsafeOutboundTextReason } from "#shared/content-security";
|
|
14
15
|
|
|
15
16
|
const DEFAULT_TIMEOUT_MS = 60000;
|
|
16
17
|
|
|
@@ -95,6 +96,14 @@ export class AzService extends Context.Service<
|
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
|
|
99
|
+
const unsafeReason = unsafeOutboundTextReason(securityCheck.argv.join(" "));
|
|
100
|
+
if (unsafeReason !== null) {
|
|
101
|
+
return yield* new AzSecurityError({
|
|
102
|
+
message: `Refusing to send command containing ${unsafeReason}.`,
|
|
103
|
+
command: "[redacted]",
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
98
107
|
const argv = [...securityCheck.argv, "--only-show-errors"];
|
|
99
108
|
|
|
100
109
|
if (!hasOutputFlag(securityCheck.argv)) {
|
package/src/azdo-tool/main.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
VERSION,
|
|
14
14
|
} from "#shared";
|
|
15
15
|
import { AuditServiceLayer, withAudit } from "#shared/audit";
|
|
16
|
+
import { withRedactedOutput } from "#shared/output-boundary";
|
|
16
17
|
import {
|
|
17
18
|
findFailedJobs,
|
|
18
19
|
getBuildJobSummary,
|
|
@@ -204,6 +205,7 @@ Raw az wrapper:
|
|
|
204
205
|
|
|
205
206
|
const cli = Command.run(mainCommand, {
|
|
206
207
|
version: VERSION,
|
|
208
|
+
renderErrors: false,
|
|
207
209
|
});
|
|
208
210
|
|
|
209
211
|
const MainLayer = AzdoServiceLayer.pipe(
|
|
@@ -212,7 +214,7 @@ const MainLayer = AzdoServiceLayer.pipe(
|
|
|
212
214
|
Layer.provideMerge(AuditServiceLayer),
|
|
213
215
|
);
|
|
214
216
|
|
|
215
|
-
const program = withAudit("azdo", cli).pipe(
|
|
217
|
+
const program = withRedactedOutput(withAudit("azdo", cli)).pipe(
|
|
216
218
|
Effect.provide(MainLayer),
|
|
217
219
|
Effect.tapCause(renderCauseToStderr),
|
|
218
220
|
);
|
package/src/azdo-tool/service.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { isCommandAllowed, isInvokeAllowed } from "./security";
|
|
|
10
10
|
import { transformCmdOutput } from "./transformers";
|
|
11
11
|
import { ConfigService, getToolConfig } from "#config";
|
|
12
12
|
import { renderCommandLine, tokenizeCommandLine } from "#shared/exec";
|
|
13
|
+
import { unsafeOutboundTextReason } from "#shared/content-security";
|
|
13
14
|
|
|
14
15
|
export class AzdoService extends Context.Service<
|
|
15
16
|
AzdoService,
|
|
@@ -120,6 +121,14 @@ export class AzdoService extends Context.Service<
|
|
|
120
121
|
);
|
|
121
122
|
|
|
122
123
|
const cmdArgv = tokenizeCommandLine(cmd);
|
|
124
|
+
const unsafeReason = unsafeOutboundTextReason([...cmdArgv, projectName].join(" "));
|
|
125
|
+
if (unsafeReason !== null) {
|
|
126
|
+
return yield* new AzdoSecurityError({
|
|
127
|
+
message: `Refusing to send command containing ${unsafeReason}.`,
|
|
128
|
+
command: "[redacted]",
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
123
132
|
const scopeArgv = [
|
|
124
133
|
"--organization",
|
|
125
134
|
azConfig.organization,
|
|
@@ -200,6 +209,14 @@ export class AzdoService extends Context.Service<
|
|
|
200
209
|
);
|
|
201
210
|
}
|
|
202
211
|
|
|
212
|
+
const unsafeReason = unsafeOutboundTextReason(argv.join(" "));
|
|
213
|
+
if (unsafeReason !== null) {
|
|
214
|
+
return yield* new AzdoSecurityError({
|
|
215
|
+
message: `Refusing to send invoke parameters containing ${unsafeReason}.`,
|
|
216
|
+
command: "invoke [redacted]",
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
203
220
|
argv.push("--organization", azConfig.organization, "--output", "json");
|
|
204
221
|
|
|
205
222
|
const fullCommand = renderCommandLine(["az", ...argv]);
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { loadConfig } from "#config/loader";
|
|
14
14
|
|
|
15
15
|
import { createCredentialGuard } from "./index";
|
|
16
|
+
import { redactSensitiveText } from "#shared/content-security";
|
|
16
17
|
|
|
17
18
|
const stdin = await Bun.stdin.text();
|
|
18
19
|
|
|
@@ -29,6 +30,6 @@ try {
|
|
|
29
30
|
);
|
|
30
31
|
} catch (error: unknown) {
|
|
31
32
|
const message = error instanceof Error ? error.message : String(error);
|
|
32
|
-
process.stderr.write(message);
|
|
33
|
+
process.stderr.write(redactSensitiveText(message));
|
|
33
34
|
process.exit(2);
|
|
34
35
|
}
|