@blogic-cz/agent-tools 0.18.1 → 1.1.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/README.md +35 -6
- package/dist/az-tool/config.d.ts +60 -12
- package/dist/az-tool/config.d.ts.map +1 -1
- package/dist/az-tool/errors.d.ts +10 -1
- package/dist/az-tool/errors.d.ts.map +1 -1
- package/dist/az-tool/profile.d.ts +16 -0
- package/dist/az-tool/profile.d.ts.map +1 -0
- package/dist/az-tool/security.d.ts +20 -3
- package/dist/az-tool/security.d.ts.map +1 -1
- package/dist/az-tool/service.d.ts +9 -4
- package/dist/az-tool/service.d.ts.map +1 -1
- package/dist/az-tool/types.d.ts +10 -60
- package/dist/az-tool/types.d.ts.map +1 -1
- package/dist/{az-tool → azdo-tool}/build.d.ts +9 -9
- package/dist/azdo-tool/build.d.ts.map +1 -0
- package/dist/azdo-tool/config.d.ts +13 -0
- package/dist/azdo-tool/config.d.ts.map +1 -0
- package/dist/azdo-tool/errors.d.ts +43 -0
- package/dist/azdo-tool/errors.d.ts.map +1 -0
- package/dist/azdo-tool/extract-option-value.d.ts.map +1 -0
- package/dist/azdo-tool/index.d.ts +3 -0
- package/dist/azdo-tool/index.d.ts.map +1 -0
- package/dist/azdo-tool/security.d.ts +4 -0
- package/dist/azdo-tool/security.d.ts.map +1 -0
- package/dist/azdo-tool/service.d.ts +15 -0
- package/dist/azdo-tool/service.d.ts.map +1 -0
- package/dist/azdo-tool/transformers.d.ts.map +1 -0
- package/dist/azdo-tool/types.d.ts +64 -0
- package/dist/azdo-tool/types.d.ts.map +1 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/types.d.ts +18 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/credential-guard/index.d.ts.map +1 -1
- package/dist/gh-tool/gist.d.ts +102 -0
- package/dist/gh-tool/gist.d.ts.map +1 -0
- package/dist/gh-tool/text-input.d.ts +1 -0
- package/dist/gh-tool/text-input.d.ts.map +1 -1
- package/dist/shared/azure-credentials.d.ts +20 -0
- package/dist/shared/azure-credentials.d.ts.map +1 -0
- package/dist/shared/binary-preflight.d.ts +1 -1
- package/package.json +8 -2
- package/schemas/agent-tools.schema.json +42 -1
- package/src/az-tool/config.ts +135 -25
- package/src/az-tool/errors.ts +14 -1
- package/src/az-tool/index.ts +67 -134
- package/src/az-tool/profile.ts +48 -0
- package/src/az-tool/security.ts +248 -89
- package/src/az-tool/service.ts +137 -242
- package/src/az-tool/types.ts +11 -64
- package/src/{az-tool → azdo-tool}/build.ts +11 -11
- package/src/azdo-tool/config.ts +33 -0
- package/src/azdo-tool/errors.ts +41 -0
- package/src/azdo-tool/index.ts +222 -0
- package/src/azdo-tool/security.ts +157 -0
- package/src/azdo-tool/service.ts +322 -0
- package/src/azdo-tool/types.ts +67 -0
- package/src/config/index.ts +1 -0
- package/src/config/loader.ts +10 -1
- package/src/config/types.ts +19 -1
- package/src/credential-guard/index.ts +7 -2
- package/src/gh-tool/gist.ts +625 -0
- package/src/gh-tool/index.ts +21 -1
- package/src/gh-tool/text-input.ts +10 -2
- package/src/shared/azure-credentials.ts +50 -0
- package/src/shared/binary-preflight.ts +1 -1
- package/dist/az-tool/build.d.ts.map +0 -1
- package/dist/az-tool/extract-option-value.d.ts.map +0 -1
- package/dist/az-tool/transformers.d.ts.map +0 -1
- /package/dist/{az-tool → azdo-tool}/extract-option-value.d.ts +0 -0
- /package/dist/{az-tool → azdo-tool}/transformers.d.ts +0 -0
- /package/src/{az-tool → azdo-tool}/extract-option-value.ts +0 -0
- /package/src/{az-tool → azdo-tool}/transformers.ts +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Azure CLI surfaces that return credential material.
|
|
3
|
+
*
|
|
4
|
+
* Shared because two tools reach the Azure CLI: az-tool for the platform, and
|
|
5
|
+
* azdo-tool for the `acr`/`account` groups it still passes through for
|
|
6
|
+
* backwards compatibility. Both must refuse the same commands — a term added
|
|
7
|
+
* to one list and not the other reopens a credential read through whichever
|
|
8
|
+
* tool was missed.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Read-shaped verbs that return credential material, in any command group. */
|
|
12
|
+
export const CREDENTIAL_BLOCKED_VERBS = [
|
|
13
|
+
"get-access-token",
|
|
14
|
+
"get-credentials",
|
|
15
|
+
"get-secrets",
|
|
16
|
+
"list-account-keys",
|
|
17
|
+
"list-connection-strings",
|
|
18
|
+
"list-keys",
|
|
19
|
+
"list-publishing-credentials",
|
|
20
|
+
"list-publishing-profiles",
|
|
21
|
+
"list-secrets",
|
|
22
|
+
"show-connection-string",
|
|
23
|
+
"show-secret",
|
|
24
|
+
] as const;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Command group segments that carry credential material. For these the listing
|
|
28
|
+
* itself returns values — `az storage account keys list` and
|
|
29
|
+
* `az webapp config appsettings list` both print secrets.
|
|
30
|
+
*/
|
|
31
|
+
export const CREDENTIAL_BLOCKED_SEGMENTS = [
|
|
32
|
+
"admin-key",
|
|
33
|
+
"appsettings",
|
|
34
|
+
"connection-string",
|
|
35
|
+
"credential",
|
|
36
|
+
"credentials",
|
|
37
|
+
"key",
|
|
38
|
+
"keys",
|
|
39
|
+
"password",
|
|
40
|
+
"query-key",
|
|
41
|
+
"sas",
|
|
42
|
+
"secret",
|
|
43
|
+
"secrets",
|
|
44
|
+
] as const;
|
|
45
|
+
|
|
46
|
+
export const isCredentialBlockedVerb = (word: string): boolean =>
|
|
47
|
+
(CREDENTIAL_BLOCKED_VERBS as readonly string[]).includes(word);
|
|
48
|
+
|
|
49
|
+
export const isCredentialBlockedSegment = (word: string): boolean =>
|
|
50
|
+
(CREDENTIAL_BLOCKED_SEGMENTS as readonly string[]).includes(word);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/az-tool/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC;;GAEG;AACH,eAAO,MAAM,gBAAgB,yLAuD3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;UAOP,QAAQ,EAAE;YACN,QAAQ,EAAE;wIAE9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,qLAkCvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,iMAwC7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,wLAgC7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;0IAazB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;aAClB,MAAM;iBACF,MAAM;UACb,MAAM;oLAwDZ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extract-option-value.d.ts","sourceRoot":"","sources":["../../src/az-tool/extract-option-value.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformers.d.ts","sourceRoot":"","sources":["../../src/az-tool/transformers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAChC,CAAC;AAwCF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAoC/D;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,WAAW,CA6B5D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAQjE"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|