@aliou/pi-guardrails 0.11.2 → 0.12.1

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.
Files changed (95) hide show
  1. package/README.md +72 -167
  2. package/extensions/guardrails/commands/examples/index.ts +520 -0
  3. package/extensions/guardrails/commands/onboarding/config.ts +54 -0
  4. package/{src/commands/onboarding-command.ts → extensions/guardrails/commands/onboarding/index.ts} +5 -31
  5. package/extensions/guardrails/commands/settings/add-rule-wizard.ts +267 -0
  6. package/extensions/guardrails/commands/settings/examples.ts +399 -0
  7. package/extensions/guardrails/commands/settings/index.ts +596 -0
  8. package/extensions/guardrails/commands/settings/path-list-editor.ts +158 -0
  9. package/extensions/guardrails/commands/settings/scope-picker-submenu.ts +69 -0
  10. package/extensions/guardrails/commands/settings/utils.ts +108 -0
  11. package/extensions/guardrails/components/onboarding-choice-step.ts +140 -0
  12. package/extensions/guardrails/components/onboarding-finish-step.ts +50 -0
  13. package/extensions/guardrails/components/onboarding-intro-step.ts +30 -0
  14. package/extensions/guardrails/components/onboarding-types.ts +10 -0
  15. package/extensions/guardrails/components/onboarding-wizard.ts +116 -0
  16. package/{src → extensions/guardrails}/components/pattern-editor.ts +11 -10
  17. package/extensions/guardrails/index.ts +106 -0
  18. package/extensions/guardrails/rules.test.ts +107 -0
  19. package/extensions/guardrails/rules.ts +119 -0
  20. package/extensions/guardrails/targets.test.ts +44 -0
  21. package/extensions/guardrails/targets.ts +66 -0
  22. package/extensions/path-access/grants.test.ts +47 -0
  23. package/extensions/path-access/grants.ts +68 -0
  24. package/extensions/path-access/index.ts +143 -0
  25. package/extensions/path-access/prompt.ts +196 -0
  26. package/extensions/path-access/rules.test.ts +46 -0
  27. package/extensions/path-access/rules.ts +37 -0
  28. package/extensions/path-access/targets.test.ts +40 -0
  29. package/extensions/path-access/targets.ts +19 -0
  30. package/extensions/permission-gate/grants.ts +21 -0
  31. package/extensions/permission-gate/index.ts +122 -0
  32. package/extensions/permission-gate/prompt.ts +222 -0
  33. package/extensions/permission-gate/rules.test.ts +132 -0
  34. package/extensions/permission-gate/rules.ts +72 -0
  35. package/package.json +18 -20
  36. package/schema.json +286 -0
  37. package/src/core/check.test.ts +169 -0
  38. package/src/core/check.ts +38 -0
  39. package/src/{hooks/permission-gate/dangerous-commands.test.ts → core/commands/dangerous.test.ts} +134 -2
  40. package/src/{hooks/permission-gate/dangerous-commands.ts → core/commands/dangerous.ts} +119 -1
  41. package/src/core/commands/index.ts +15 -0
  42. package/src/core/index.ts +13 -0
  43. package/src/{utils/path-access.test.ts → core/paths/access.test.ts} +1 -5
  44. package/src/core/paths/index.ts +14 -0
  45. package/src/core/shell/command-args.test.ts +142 -0
  46. package/src/{utils → core/shell}/command-args.ts +71 -0
  47. package/src/core/shell/index.ts +2 -0
  48. package/src/core/types.ts +55 -0
  49. package/src/shared/config/defaults.ts +118 -0
  50. package/src/shared/config/index.ts +17 -0
  51. package/src/shared/config/loader.ts +64 -0
  52. package/src/shared/config/migration/001-v0-format-upgrade.ts +107 -0
  53. package/src/shared/config/migration/002-strip-toolchain-fields.ts +39 -0
  54. package/src/shared/config/migration/003-strip-command-explainer-fields.ts +42 -0
  55. package/src/shared/config/migration/004-env-files-to-policies.ts +87 -0
  56. package/src/shared/config/migration/005-normalize-allowed-paths.ts +43 -0
  57. package/src/shared/config/migration/006-apply-builtin-defaults.ts +19 -0
  58. package/src/shared/config/migration/007-mark-onboarding-done.ts +25 -0
  59. package/src/shared/config/migration/index.ts +44 -0
  60. package/src/shared/config/migration/version.ts +7 -0
  61. package/src/shared/config/types.ts +141 -0
  62. package/src/shared/events.ts +100 -0
  63. package/src/shared/index.ts +6 -0
  64. package/src/shared/matching.test.ts +86 -0
  65. package/src/{utils → shared}/matching.ts +4 -4
  66. package/src/{utils → shared/paths}/bash-paths.test.ts +32 -2
  67. package/src/{utils → shared/paths}/bash-paths.ts +4 -4
  68. package/src/shared/paths/index.ts +1 -0
  69. package/src/shared/warnings.ts +17 -0
  70. package/docs/defaults.md +0 -140
  71. package/docs/examples.md +0 -170
  72. package/src/commands/onboarding.ts +0 -390
  73. package/src/commands/settings-command.ts +0 -1616
  74. package/src/config.ts +0 -392
  75. package/src/hooks/index.ts +0 -11
  76. package/src/hooks/path-access.ts +0 -395
  77. package/src/hooks/permission-gate/index.test.ts +0 -332
  78. package/src/hooks/permission-gate/index.ts +0 -595
  79. package/src/hooks/policies.ts +0 -322
  80. package/src/index.ts +0 -96
  81. package/src/lib/executor.ts +0 -280
  82. package/src/lib/index.ts +0 -16
  83. package/src/lib/model-resolver.ts +0 -47
  84. package/src/lib/timing.ts +0 -42
  85. package/src/lib/types.ts +0 -115
  86. package/src/utils/command-args.test.ts +0 -83
  87. package/src/utils/events.ts +0 -32
  88. package/src/utils/migration.test.ts +0 -58
  89. package/src/utils/migration.ts +0 -340
  90. package/src/utils/warnings.ts +0 -7
  91. /package/src/{utils/path-access.ts → core/paths/access.ts} +0 -0
  92. /package/src/{utils → core/paths}/path.test.ts +0 -0
  93. /package/src/{utils → core/paths}/path.ts +0 -0
  94. /package/src/{utils/shell-utils.ts → core/shell/ast.ts} +0 -0
  95. /package/src/{utils/glob-expander.ts → shared/glob.ts} +0 -0
@@ -0,0 +1,86 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import {
3
+ compileCommandPattern,
4
+ compileFilePattern,
5
+ normalizeFilePath,
6
+ } from "./matching";
7
+ import { drainPendingWarnings } from "./warnings";
8
+
9
+ describe("normalizeFilePath", () => {
10
+ it.each([
11
+ ["./src//file.ts", "src/file.ts"],
12
+ ["src\\file.ts", "src/file.ts"],
13
+ ["./foo\\bar//baz", "foo/bar/baz"],
14
+ ])("normalizes %s", (input, expected) => {
15
+ expect(normalizeFilePath(input)).toBe(expected);
16
+ });
17
+ });
18
+
19
+ describe("compileFilePattern", () => {
20
+ it("matches basename when the pattern has no slash", () => {
21
+ const pattern = compileFilePattern({ pattern: ".env" });
22
+
23
+ expect(pattern.test(".env")).toBe(true);
24
+ expect(pattern.test("config/.env")).toBe(true);
25
+ expect(pattern.test("config/.env.local")).toBe(false);
26
+ });
27
+
28
+ it("matches full normalized paths when the pattern has a slash", () => {
29
+ const pattern = compileFilePattern({ pattern: "config/*.env" });
30
+
31
+ expect(pattern.test("config/app.env")).toBe(true);
32
+ expect(pattern.test("./config//app.env")).toBe(true);
33
+ expect(pattern.test("nested/config/app.env")).toBe(false);
34
+ });
35
+
36
+ it("uses case-insensitive regex matching for file patterns", () => {
37
+ const pattern = compileFilePattern({
38
+ pattern: "SECRET\\.TXT$",
39
+ regex: true,
40
+ });
41
+
42
+ expect(pattern.test("docs/secret.txt")).toBe(true);
43
+ expect(pattern.test("docs/public.txt")).toBe(false);
44
+ });
45
+
46
+ it("records a warning and returns a non-matching pattern for invalid regex", () => {
47
+ drainPendingWarnings();
48
+
49
+ const pattern = compileFilePattern({ pattern: "[", regex: true });
50
+
51
+ expect(pattern.test("anything")).toBe(false);
52
+ expect(drainPendingWarnings()).toEqual([
53
+ "Invalid regex in guardrails config: [",
54
+ ]);
55
+ });
56
+ });
57
+
58
+ describe("compileCommandPattern", () => {
59
+ it("uses substring matching by default", () => {
60
+ const pattern = compileCommandPattern({ pattern: "deploy production" });
61
+
62
+ expect(pattern.test("please deploy production now")).toBe(true);
63
+ expect(pattern.test("deploy staging")).toBe(false);
64
+ });
65
+
66
+ it("uses regex matching when requested", () => {
67
+ const pattern = compileCommandPattern({
68
+ pattern: "terraform\\s+apply",
69
+ regex: true,
70
+ });
71
+
72
+ expect(pattern.test("terraform apply -auto-approve")).toBe(true);
73
+ expect(pattern.test("terraform plan")).toBe(false);
74
+ });
75
+
76
+ it("records a warning and returns a non-matching pattern for invalid regex", () => {
77
+ drainPendingWarnings();
78
+
79
+ const pattern = compileCommandPattern({ pattern: "[", regex: true });
80
+
81
+ expect(pattern.test("anything")).toBe(false);
82
+ expect(drainPendingWarnings()).toEqual([
83
+ "Invalid regex in guardrails config: [",
84
+ ]);
85
+ });
86
+ });
@@ -9,8 +9,8 @@
9
9
  */
10
10
 
11
11
  import { matchesGlob } from "node:path";
12
- import type { PatternConfig } from "../config";
13
- import { pendingWarnings } from "./warnings";
12
+ import type { PatternConfig } from "./config";
13
+ import { addPendingWarning } from "./warnings";
14
14
 
15
15
  export interface CompiledPattern {
16
16
  test: (input: string) => boolean;
@@ -47,7 +47,7 @@ export function compileFilePattern(config: PatternConfig): CompiledPattern {
47
47
  source: config,
48
48
  };
49
49
  } catch {
50
- pendingWarnings.push(
50
+ addPendingWarning(
51
51
  `Invalid regex in guardrails config: ${config.pattern}`,
52
52
  );
53
53
  return { test: () => false, source: config };
@@ -80,7 +80,7 @@ export function compileCommandPattern(config: PatternConfig): CompiledPattern {
80
80
  const re = new RegExp(config.pattern);
81
81
  return { test: (input) => re.test(input), source: config };
82
82
  } catch {
83
- pendingWarnings.push(
83
+ addPendingWarning(
84
84
  `Invalid regex in guardrails config: ${config.pattern}`,
85
85
  );
86
86
  return { test: () => false, source: config };
@@ -6,6 +6,27 @@ const CWD = "/work/project";
6
6
  const HOME = homedir();
7
7
 
8
8
  describe("extractBashPathCandidates", () => {
9
+ it("does not extract go package wildcard patterns as paths", async () => {
10
+ const result = await extractBashPathCandidates("go test ./...", CWD);
11
+
12
+ expect(result).toEqual([]);
13
+ });
14
+
15
+ it("extracts go run .go file operands", async () => {
16
+ const result = await extractBashPathCandidates("go run main.go", CWD);
17
+
18
+ expect(result).toEqual(["/work/project/main.go"]);
19
+ });
20
+
21
+ it("handles go -C global flag", async () => {
22
+ const result = await extractBashPathCandidates(
23
+ "go -C /tmp test ./...",
24
+ CWD,
25
+ );
26
+
27
+ expect(result).toEqual([]);
28
+ });
29
+
9
30
  describe("when a command has regular expression arguments", () => {
10
31
  it("ignores sed expressions and extracts file operands", async () => {
11
32
  const result = await extractBashPathCandidates(
@@ -84,8 +105,8 @@ describe("extractBashPathCandidates", () => {
84
105
 
85
106
  it("detects Windows-style paths", async () => {
86
107
  const result = await extractBashPathCandidates("type C:\\foo\\bar", CWD);
87
- expect(result.length).toBeGreaterThan(0);
88
- // On POSIX, resolve() treats backslash path as a single component under cwd
108
+
109
+ expect(result).toHaveLength(1);
89
110
  expect(result[0]).toContain("C:\\foo\\bar");
90
111
  });
91
112
  });
@@ -102,6 +123,15 @@ describe("extractBashPathCandidates", () => {
102
123
  await extractBashPathCandidates("echo foo > /tmp/out", CWD),
103
124
  ).toEqual(["/tmp/out"]);
104
125
  });
126
+
127
+ it("extracts paths from multiple commands and redirects", async () => {
128
+ expect(
129
+ await extractBashPathCandidates(
130
+ "cat ./input && grep needle /tmp/log > ./out",
131
+ CWD,
132
+ ),
133
+ ).toEqual(["/work/project/input", "/tmp/log", "/work/project/out"]);
134
+ });
105
135
  });
106
136
 
107
137
  describe("when command has no path-like tokens", () => {
@@ -1,9 +1,9 @@
1
1
  import { resolve } from "node:path";
2
2
  import { parse } from "@aliou/sh";
3
- import { classifyCommandArgs } from "./command-args";
4
- import { expandGlob, hasGlobChars } from "./glob-expander";
5
- import { expandHomePath, maybePathLike } from "./path";
6
- import { walkCommands, wordToString } from "./shell-utils";
3
+ import { expandHomePath, maybePathLike } from "../../core/paths/path";
4
+ import { walkCommands, wordToString } from "../../core/shell/ast";
5
+ import { classifyCommandArgs } from "../../core/shell/command-args";
6
+ import { expandGlob, hasGlobChars } from "../glob";
7
7
 
8
8
  async function expandCandidate(
9
9
  candidate: string,
@@ -0,0 +1 @@
1
+ export { extractBashPathCandidates } from "./bash-paths";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Module-level warnings queue for messages that arise before any session
3
+ * context is available (config loading, migration, pattern compilation).
4
+ */
5
+ const pendingWarnings: string[] = [];
6
+
7
+ export function addPendingWarning(message: string): void {
8
+ pendingWarnings.push(message);
9
+ }
10
+
11
+ export function getPendingWarnings(): readonly string[] {
12
+ return pendingWarnings;
13
+ }
14
+
15
+ export function drainPendingWarnings(): string[] {
16
+ return pendingWarnings.splice(0);
17
+ }
package/docs/defaults.md DELETED
@@ -1,140 +0,0 @@
1
- # Default Configuration
2
-
3
- These are the built-in defaults that ship with guardrails. Rules marked as disabled are included but inactive by default — enable them in your config or via `/guardrails:settings`.
4
-
5
- Source: [`src/config.ts`](../src/config.ts)
6
-
7
-
8
- Home-directory defaults use `~` in patterns. During policy evaluation, guardrails expands `~` to the current user's home directory before checking whether a file exists or should be blocked.
9
- ## Default Policy Rules
10
-
11
- ### `secret-files` — Files containing secrets
12
-
13
- Blocks access to dotenv files and similar secret-bearing files.
14
-
15
- | Protection | Only if exists |
16
- |------------|---------------|
17
- | `noAccess` | yes |
18
-
19
- **Patterns:**
20
-
21
- | Pattern | Type |
22
- |--------------------|------|
23
- | `.env` | glob |
24
- | `.env.local` | glob |
25
- | `.env.production` | glob |
26
- | `.env.prod` | glob |
27
- | `.dev.vars` | glob |
28
-
29
- **Allowed exceptions:**
30
-
31
- | Pattern | Type |
32
- |--------------------|------|
33
- | `*.example.env` | glob |
34
- | `*.sample.env` | glob |
35
- | `*.test.env` | glob |
36
- | `.env.example` | glob |
37
- | `.env.sample` | glob |
38
- | `.env.test` | glob |
39
-
40
- ---
41
-
42
- ### `home-ssh` — SSH directory and keys
43
-
44
- Blocks access to SSH configuration, private keys, and related files. Disabled by default.
45
-
46
- | Protection | Only if exists | Enabled by default |
47
- |------------|---------------|-------------------|
48
- | `noAccess` | yes | no |
49
-
50
- **Patterns:**
51
-
52
- | Pattern | Type |
53
- |-----------------------|------|
54
- | `~/.ssh/**` | glob |
55
- | `~/.ssh/*_rsa` | glob |
56
- | `~/.ssh/*_ed25519` | glob |
57
- | `~/.ssh/*.pem` | glob |
58
-
59
- **Allowed exceptions:**
60
-
61
- | Pattern | Type |
62
- |----------|------|
63
- | `~/.ssh/*.pub` | glob |
64
-
65
- ---
66
-
67
- ### `home-config` — Sensitive user configuration directories
68
-
69
- Blocks access to a small set of known sensitive config directories that commonly store credentials, tokens, or encrypted material. Disabled by default — enable it if these tools are installed and you want to protect them.
70
-
71
- | Protection | Only if exists | Enabled by default |
72
- |------------|---------------|-------------------|
73
- | `noAccess` | yes | no |
74
-
75
- **Patterns:**
76
-
77
- | Pattern | Type |
78
- |-----------------------|------|
79
- | `~/.config/gh/**` | glob |
80
- | `~/.config/gcloud/**` | glob |
81
- | `~/.config/op/**` | glob |
82
- | `~/.config/sops/**` | glob |
83
-
84
- ---
85
-
86
- ### `home-gpg` — GPG keys and configuration
87
-
88
- Blocks access to GPG/GnuPG private keys, keyrings, and configuration. Disabled by default.
89
-
90
- | Protection | Only if exists | Enabled by default |
91
- |------------|---------------|-------------------|
92
- | `noAccess` | yes | no |
93
-
94
- **Patterns:**
95
-
96
- | Pattern | Type |
97
- |--------------------|------|
98
- | `~/.gnupg/**` | glob |
99
- | `~/*.gpg` | glob |
100
- | `~/.gpg-agent.conf` | glob |
101
-
102
- ---
103
-
104
- ## Path Access
105
-
106
- | Setting | Default |
107
- |---|---|
108
- | `features.pathAccess` | `false` |
109
- | `pathAccess.mode` | `"ask"` |
110
- | `pathAccess.allowedPaths` | `[]` |
111
-
112
- Modes:
113
- - `allow` — no path restrictions
114
- - `ask` — prompt when accessing paths outside working directory
115
- - `block` — deny all access outside working directory
116
-
117
- Allowed paths use trailing-slash convention:
118
- - `/path/to/file` — exact file match
119
- - `/path/to/dir/` — directory and all descendants
120
- - Supports `~/` for home directory
121
-
122
- Limitations:
123
- - Bash path extraction is best-effort (AST-based heuristics). Tokens like `application/json` may trigger false-positive prompts.
124
- - Symlinks are not resolved. Lexical path comparison only.
125
- - In non-interactive mode (--print), `ask` mode degrades to `block`.
126
-
127
- ---
128
-
129
- ## Default Permission Gate Patterns
130
-
131
- These commands are detected using AST-based structural matching for accuracy.
132
-
133
- | Pattern | Description |
134
- |-----------------|--------------------------------|
135
- | `rm -rf` | Recursive force delete |
136
- | `sudo` | Superuser command |
137
- | `dd of=` | Disk write operation |
138
- | `mkfs.` | Filesystem format |
139
- | `chmod -R 777` | Insecure recursive permissions |
140
- | `chown -R` | Recursive ownership change |
package/docs/examples.md DELETED
@@ -1,170 +0,0 @@
1
- # Example Presets
2
-
3
- Pre-configured presets available in the `/guardrails:settings` Examples tab. These can be applied to any config scope (global, local, or memory).
4
-
5
- Source: [`src/commands/settings-command.ts`](../src/commands/settings-command.ts)
6
-
7
- ## File Policy Presets
8
-
9
- ### Secrets (.env)
10
-
11
- Block dotenv-like files using glob patterns.
12
-
13
- | Field | Value |
14
- |------------|------------------------------------|
15
- | ID | `example-secret-env-files` |
16
- | Protection | `noAccess` |
17
- | Patterns | `.env`, `.env.*` |
18
- | Exceptions | `.env.example`, `*.sample.env` |
19
-
20
- ---
21
-
22
- ### Logs (*.log)
23
-
24
- Mark log files as read-only to prevent accidental modification.
25
-
26
- | Field | Value |
27
- |------------|---------------------------|
28
- | ID | `example-log-files` |
29
- | Protection | `readOnly` |
30
- | Patterns | `*.log`, `*.out` |
31
-
32
- ---
33
-
34
- ### Regex env
35
-
36
- Regex-based matching for `.env` and `.env.*` files. Demonstrates regex mode.
37
-
38
- | Field | Value |
39
- |------------|------------------------------------------|
40
- | ID | `example-regex-env` |
41
- | Protection | `noAccess` |
42
- | Patterns | `^\.env(\..+)?$` (regex) |
43
- | Exceptions | `^\.env\.example$` (regex) |
44
-
45
- ---
46
-
47
- ### SSH keys
48
-
49
- Block access to SSH private key files.
50
-
51
- | Field | Value |
52
- |------------|--------------------------------------|
53
- | ID | `example-ssh-keys` |
54
- | Protection | `noAccess` |
55
- | Patterns | `*.pem`, `*_rsa`, `*_ed25519` |
56
- | Exceptions | `*.pub` |
57
-
58
- ---
59
-
60
- ### AWS credentials
61
-
62
- Block AWS CLI credentials and config files.
63
-
64
- | Field | Value |
65
- |------------|----------------------------------------|
66
- | ID | `example-aws-credentials` |
67
- | Protection | `noAccess` |
68
- | Patterns | `.aws/credentials`, `.aws/config` |
69
-
70
- ---
71
-
72
- ### Database files
73
-
74
- Mark SQLite and database files as read-only.
75
-
76
- | Field | Value |
77
- |------------|----------------------------------------|
78
- | ID | `example-database-files` |
79
- | Protection | `readOnly` |
80
- | Patterns | `*.db`, `*.sqlite`, `*.sqlite3` |
81
-
82
- ---
83
-
84
- ### Kubernetes secrets
85
-
86
- Block kubeconfig and Kubernetes secret files.
87
-
88
- | Field | Value |
89
- |------------|----------------------------------------|
90
- | ID | `example-k8s-secrets` |
91
- | Protection | `noAccess` |
92
- | Patterns | `.kube/config`, `*kubeconfig*` |
93
-
94
- ---
95
-
96
- ### Certificates
97
-
98
- Block SSL/TLS certificate and key files.
99
-
100
- | Field | Value |
101
- |------------|----------------------------------------|
102
- | ID | `example-certificates` |
103
- | Protection | `noAccess` |
104
- | Patterns | `*.crt`, `*.key`, `*.p12` |
105
- | Exceptions | `*.csr` |
106
-
107
- ---
108
-
109
- ## Dangerous Command Presets
110
-
111
- ### General
112
-
113
- | Label | Pattern | Description |
114
- |--------------------|----------------------|----------------------------------------|
115
- | Homebrew | `brew` | Homebrew package manager |
116
- | git push --force | `git push --force` | Git force push |
117
- | npm publish | `npm publish` | NPM package publishing |
118
- | yarn publish | `yarn publish` | Yarn package publishing |
119
- | pnpm publish | `pnpm publish` | PNPM package publishing |
120
- | drop database | `DROP DATABASE` | SQL database drop |
121
- | drop table | `DROP TABLE` | SQL table drop |
122
-
123
- ### dbt
124
-
125
- | Label | Pattern | Description |
126
- |----------|------------|------------------------|
127
- | dbt run | `dbt run` | dbt model execution |
128
- | dbt seed | `dbt seed` | dbt seed data loading |
129
-
130
- ### AWS
131
-
132
- | Label | Pattern | Description |
133
- |----------------------|--------------------------------|------------------------------|
134
- | aws s3 rm | `aws s3 rm` | AWS S3 object deletion |
135
- | aws iam | `aws iam` | AWS IAM permission changes |
136
- | aws ec2 terminate | `aws ec2 terminate-instances` | AWS EC2 instance termination |
137
-
138
- ### Kubernetes
139
-
140
- | Label | Pattern | Description |
141
- |----------------|------------------|--------------------------------|
142
- | kubectl delete | `kubectl delete` | Kubernetes resource deletion |
143
- | kubectl apply | `kubectl apply` | Kubernetes resource application|
144
- | kubectl scale | `kubectl scale` | Kubernetes scaling operation |
145
-
146
- ### Docker
147
-
148
- | Label | Pattern | Description |
149
- |----------------------|------------------------|------------------------------------------|
150
- | Docker secrets | `docker inspect` | Docker inspect (may expose env vars) |
151
- | docker rm | `docker rm` | Docker container removal |
152
- | docker rmi | `docker rmi` | Docker image removal |
153
- | docker system prune | `docker system prune` | Docker system cleanup |
154
- | docker compose down | `docker compose down` | Docker Compose service teardown |
155
-
156
- ### Terraform
157
-
158
- | Label | Pattern | Description |
159
- |--------------------|----------------------|------------------------------------|
160
- | Terraform apply | `terraform apply` | Terraform infrastructure changes |
161
- | Terraform destroy | `terraform destroy` | Terraform infrastructure destruction|
162
- | terraform import | `terraform import` | Terraform resource import |
163
-
164
- ### Google Cloud
165
-
166
- | Label | Pattern | Description |
167
- |------------------------|------------------------------------|----------------------------------|
168
- | gcloud compute delete | `gcloud compute instances delete` | GCP compute instance deletion |
169
- | gcloud iam | `gcloud iam` | GCP IAM permission changes |
170
- | gcloud sql delete | `gcloud sql instances delete` | GCP Cloud SQL instance deletion |