@secureci/cli 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -162,8 +162,26 @@ The exact scope of each is documented in
162
162
  redacted in all output, and in container mode never appear on the client
163
163
  command line (passed via a `0600` env file). Prefer `--secret NAME` so the
164
164
  value stays out of your shell history too.
165
- - **Tokens are handled carefully** — only sent to GitHub, never passed to
166
- actions, masked in logs.
165
+ - **Tokens are handled carefully** — sent only to the GitHub host in
166
+ `GITHUB_SERVER_URL` / `GITHUB_API_URL` (github.com by default), never passed
167
+ to actions, and masked in logs.
168
+
169
+ ### What the package accesses, and why
170
+
171
+ Installing and running `secureci` involves these capabilities. Each is needed for
172
+ the feature named, and none runs at install time.
173
+
174
+ | Capability | Where | Why |
175
+ | ------------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
176
+ | Shell / process spawning | `run:` steps, JavaScript actions, `docker`/`podman`/`nerdctl` | Runs workflow steps in a container (or on your host with `--container-runtime host`). `commander` also loads `child_process`, used only for executable subcommands this CLI does not use. |
177
+ | Network | `github.com`, `api.github.com` (or the GHES host you set) | Downloads actions and workflows, and resolves tags to commit SHAs. |
178
+ | Environment variables | `HOME`, `PATH`, `GITHUB_*`, `GITHUB_TOKEN`, `GH_TOKEN` | Builds the runner environment and authenticates GitHub downloads. |
179
+ | Filesystem | `~/.secureci/`, the working directory, temp dirs | Caches actions, stores artifacts and config, and reads your workflow files. |
180
+ | Hard-coded URLs | GitHub documentation and JSON Schema URLs in messages and editor hints | Informational only; the CLI does not fetch them. |
181
+
182
+ No install scripts run for consumers. The published tarball contains only
183
+ `dist/`, `README.md`, and `LICENSE`. See [SECURITY.md](SECURITY.md) for how to
184
+ report a vulnerability.
167
185
 
168
186
  Full details: [DOCS.md → Security: what runs where](DOCS.md#security-what-runs-where)
169
187
  and [Secret masking](DOCS.md#secret-masking).
@@ -199,4 +217,15 @@ humans and agents live in [AGENTS.md](AGENTS.md) and
199
217
 
200
218
  ## License
201
219
 
202
- MIT
220
+ The code is licensed under the [MIT License](LICENSE).
221
+
222
+ ## Name and trademark
223
+
224
+ The **code** is open source under MIT; the **SecureCI name and logo** are not.
225
+ "SecureCI", the `secureci` command branding, and the `@secureci` npm scope are
226
+ trademarks of SecureCI. You may use the name to describe your use of this
227
+ software (for example, "works with SecureCI"), but you may not use it to name or
228
+ brand a fork, a derivative product or service, or a hosted offering, and you may
229
+ not imply endorsement by SecureCI. Forks must use a different name and must not
230
+ publish under the `@secureci` scope. These rights are reserved and are not granted by the
231
+ MIT License.
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * Minimal terminal colouring for log output. Replaces `chalk`, whose
4
+ * transitive dependencies (supports-color, has-flag, ansi-styles, ...) pull in
5
+ * an unmaintained package and add supply-chain surface for a few log colours.
6
+ *
7
+ * Colour is used only on a terminal, and is turned off by NO_COLOR or
8
+ * TERM=dumb, or turned on by FORCE_COLOR, following the same conventions chalk
9
+ * followed.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.colors = void 0;
13
+ exports.createColors = createColors;
14
+ // [open, close] SGR codes.
15
+ const CODES = {
16
+ gray: [90, 39],
17
+ red: [31, 39],
18
+ green: [32, 39],
19
+ yellow: [33, 39],
20
+ blue: [34, 39],
21
+ cyan: [36, 39]
22
+ };
23
+ function colorEnabled(env, isTTY) {
24
+ if (env.NO_COLOR !== undefined && env.NO_COLOR !== '')
25
+ return false;
26
+ if (env.TERM === 'dumb')
27
+ return false;
28
+ if (env.FORCE_COLOR !== undefined && env.FORCE_COLOR !== '0')
29
+ return true;
30
+ return isTTY;
31
+ }
32
+ /** Build the colour functions for a given environment and output stream. */
33
+ function createColors(env, isTTY) {
34
+ const enabled = colorEnabled(env, isTTY);
35
+ const paint = ([open, close]) => (text) => enabled ? `\u001b[${open}m${text}\u001b[${close}m` : text;
36
+ return {
37
+ gray: paint(CODES.gray),
38
+ red: paint(CODES.red),
39
+ green: paint(CODES.green),
40
+ yellow: paint(CODES.yellow),
41
+ blue: paint(CODES.blue),
42
+ cyan: paint(CODES.cyan)
43
+ };
44
+ }
45
+ /** Colours for the process's stdout. */
46
+ exports.colors = createColors(process.env, Boolean(process.stdout.isTTY));
47
+ //# sourceMappingURL=ansi.js.map
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.logger = exports.LogLevel = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
4
+ const ansi_1 = require("./ansi");
8
5
  var LogLevel;
9
6
  (function (LogLevel) {
10
7
  LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
@@ -51,35 +48,35 @@ class Logger {
51
48
  }
52
49
  debug(message, ...args) {
53
50
  if (this.level <= LogLevel.DEBUG) {
54
- console.log(chalk_1.default.gray(`[DEBUG] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
51
+ console.log(ansi_1.colors.gray(`[DEBUG] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
55
52
  }
56
53
  }
57
54
  info(message, ...args) {
58
55
  if (this.level <= LogLevel.INFO) {
59
- console.log(chalk_1.default.blue(`[INFO] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
56
+ console.log(ansi_1.colors.blue(`[INFO] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
60
57
  }
61
58
  }
62
59
  success(message, ...args) {
63
60
  if (this.level <= LogLevel.INFO) {
64
- console.log(chalk_1.default.green(`✓ ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
61
+ console.log(ansi_1.colors.green(`✓ ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
65
62
  }
66
63
  }
67
64
  warn(message, ...args) {
68
65
  if (this.level <= LogLevel.WARN) {
69
- console.warn(chalk_1.default.yellow(`[WARN] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
66
+ console.warn(ansi_1.colors.yellow(`[WARN] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
70
67
  }
71
68
  }
72
69
  error(message, ...args) {
73
70
  if (this.level <= LogLevel.ERROR) {
74
- console.error(chalk_1.default.red(`[ERROR] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
71
+ console.error(ansi_1.colors.red(`[ERROR] ${this.mask(message)}`), ...args.map((a) => this.maskArg(a)));
75
72
  }
76
73
  }
77
74
  step(message) {
78
- console.log(chalk_1.default.cyan(`\n→ ${this.mask(message)}`));
75
+ console.log(ansi_1.colors.cyan(`\n→ ${this.mask(message)}`));
79
76
  }
80
77
  result(message, success) {
81
78
  const icon = success ? '✓' : '✗';
82
- const color = success ? chalk_1.default.green : chalk_1.default.red;
79
+ const color = success ? ansi_1.colors.green : ansi_1.colors.red;
83
80
  console.log(color(`${icon} ${this.mask(message)}`));
84
81
  }
85
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secureci/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "SecureCI: validate, check against pipeline standards, and run GitHub Actions workflows locally",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -58,7 +58,6 @@
58
58
  },
59
59
  "prettier": "@jabraf/prettier",
60
60
  "dependencies": {
61
- "chalk": "^4.1.2",
62
61
  "commander": "^11.1.0",
63
62
  "yaml": "^2.3.4"
64
63
  },