You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Copilot Instructions for os-image-composer
1
+
# Copilot Instructions for ict
2
2
3
3
## Architecture Overview
4
4
5
-
OS Image Composer builds custom Linux images from pre-built packages. Key components:
5
+
ICT builds custom Linux images from pre-built packages. Key components:
6
6
7
7
-**Provider** (`internal/provider/`) - Orchestrates builds per OS (azl, elxr, emt, rcd, ubuntu). Implements `Provider` interface with `Name`, `Init`, `PreProcess`, `BuildImage`, `PostProcess` methods. Each provider exports an `OsName` constant and a `Register()` function
-**Imports**: stdlib → third-party → local (blank line separated)
79
79
-**Struct-based design over globals** — prefer dependency injection
80
80
-**Interface naming**: should end with `-er` when possible (e.g., `PackageInstaller`, `ConfigReader`)
81
-
-**Named returns + defer for cleanup** — the standard cleanup pattern (not "goto fail"); see [coding style Section 4.3](../docs/architecture/os-image-composer-coding-style.md)
81
+
-**Named returns + defer for cleanup** — the standard cleanup pattern (not "goto fail"); see [coding style Section 4.3](../docs/architecture/ict-coding-style.md)
82
82
-**Linters** (`earthly +lint`): `govet`, `gofmt`, `errcheck`, `staticcheck`, `unused`, `gosimple` — all errors must be handled (`errcheck` is enforced)
83
83
- Shell scripts: `set -euo pipefail`
84
-
- See `docs/architecture/os-image-composer-coding-style.md` for the full guide
84
+
- See `docs/architecture/ict-coding-style.md` for the full guide
85
85
86
86
## Security
87
87
88
88
-**HTTP clients**: Always use `network.NewSecureHTTPClient()` or the singleton `network.GetSecureHTTPClient()` from `internal/utils/network/` — enforces TLS 1.2+ with approved cipher suites. Never use `http.DefaultClient`
89
89
-**Command execution**: Use the `internal/utils/shell/` package which maintains an allowlist of approved system commands. Never use raw `exec.Command()`
90
90
-**Input validation**: Sanitize user-provided filenames and paths; use `filepath.Clean()` on paths
91
-
-**Template validation**: Templates are validated against JSON schema (`os-image-template.schema.json`) via `os-image-composer validate`
91
+
-**Template validation**: Templates are validated against JSON schema (`os-image-template.schema.json`) via `ict validate`
92
92
-**File permissions**: `0700` for chroot dirs, `0755` for general dirs, `0644` for data files, `0640` for log files
93
93
- CI runs **Trivy** (dependency vulnerability scanning — fails on HIGH/CRITICAL), **Gitleaks** (secret detection), and **Zizmor** (GitHub Actions security auditing)
94
94
@@ -100,16 +100,16 @@ Before opening a PR, check whether your changes affect any of these and update a
100
100
101
101
| What changed | Docs to update |
102
102
|---|---|
103
-
| CLI flags or commands |`docs/architecture/os-image-composer-cli-specification.md`, `docs/tutorial/usage-guide.md`|
103
+
| CLI flags or commands |`docs/architecture/ict-cli-specification.md`, `docs/tutorial/usage-guide.md`|
104
104
| Build process or Earthfile targets |`docs/tutorial/usage-guide.md`, this file's **Build and Test** section |
0 commit comments