@nimiplatform/app-tools 0.2.2 → 0.2.4

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
@@ -92,7 +92,7 @@ public App repository
92
92
 
93
93
  The registry references publisher Release assets and never mirrors bytes. GitHub Release is not catalog admission; catalog admission is not installed; installed is not running; running is not Nimi Access ready.
94
94
 
95
- Repository administration must enable a protected `v*` tag ruleset and GitHub immutable releases before production. The managed tag workflow fetches the repository's canonical default branch and rejects a tag commit outside that history before production preflight, build, attestation, or Release. A fine-grained `GITHUB_REPOSITORY_ADMIN_TOKEN` secret with repository Administration read permission lets the workflow verify protected-tag and immutable-release settings; it cannot enable or change them. Manual workflow dispatch runs only the non-production build/package path. On Windows, the tag-only production build invokes the App-declared production build with no certificate-secret mapping or app-tools-owned signing step. Optional native signing remains publisher-owned and must already be reflected in the final exact Runtime entry before production pack observes and records its native-trust posture; a present invalid or unresolved signature still fails closed. A successful tag workflow creates the immutable publisher GitHub Release and no registry, installed, running, or Nimi Access truth. Registry submission, the shared installed carrier, and installed launch remain unavailable.
95
+ Repository administration must enable a protected `v*` tag ruleset and GitHub immutable releases before production. The managed tag workflow fetches the repository's canonical default branch and rejects a tag commit outside that history before production preflight, build, attestation, or Release. A fine-grained `NIMI_REPOSITORY_ADMIN_TOKEN` secret with repository Administration read permission lets the workflow verify protected-tag and immutable-release settings; it cannot enable or change them. Manual workflow dispatch runs only the non-production build/package path. On Windows, the tag-only production build invokes the App-declared production build with no certificate-secret mapping or app-tools-owned signing step. Optional native signing remains publisher-owned and must already be reflected in the final exact Runtime entry before production pack observes and records its native-trust posture; a present invalid or unresolved signature still fails closed. A successful tag workflow creates the immutable publisher GitHub Release and no registry, installed, running, or Nimi Access truth. Registry submission, the shared installed carrier, and installed launch remain unavailable.
96
96
 
97
97
  ## Acceptance status
98
98
 
@@ -4,6 +4,7 @@ import { parse as parseYaml } from 'yaml';
4
4
  import {
5
5
  buildAppScaffoldSnapshotFromIntent,
6
6
  hashScaffoldContent,
7
+ managedAppReleaseWorkflowSource,
7
8
  SCAFFOLD_INTENT_PATH,
8
9
  SCAFFOLD_LOCK_VERSION,
9
10
  SCAFFOLD_LOCK_PATH,
@@ -363,6 +364,8 @@ function scanForbiddenPatterns(targetDir, profile, selectedLabels = null) {
363
364
  for (const filePath of collectTextFiles(targetDir)) {
364
365
  const relativePath = path.relative(targetDir, filePath).split(path.sep).join('/');
365
366
  const text = readFileSync(filePath, 'utf8');
367
+ const isManagedReleaseWorkflow = relativePath === '.github/workflows/nimi-app-release.yml'
368
+ && text.replaceAll('\r\n', '\n') === managedAppReleaseWorkflowSource();
366
369
  const isTestFile = relativePath.startsWith('test/') || /(?:^|\/)\w[^/]*\.(?:test|spec)\.[cm]?[jt]sx?$/i.test(relativePath);
367
370
  for (const [label, pattern] of patterns) {
368
371
  if (selectedLabels && !selectedLabels.has(label)) {
@@ -380,6 +383,11 @@ function scanForbiddenPatterns(targetDir, profile, selectedLabels = null) {
380
383
  if (isTestFile && testFileAllowedLabels.has(label)) {
381
384
  continue;
382
385
  }
386
+ // The exact managed workflow uses a GitHub repository-read credential,
387
+ // not App-owned Runtime protected material.
388
+ if (label === 'environment custody of protected material' && isManagedReleaseWorkflow) {
389
+ continue;
390
+ }
383
391
  if (pattern.test(text)) {
384
392
  findings.push(`${relativePath}: ${label}`);
385
393
  }
@@ -104,7 +104,7 @@ const APP_RELEASE_WORKFLOW = [
104
104
  ' - name: Require protected tags and immutable releases',
105
105
  " if: github.event_name == 'push' && github.ref_type == 'tag'",
106
106
  ' env:',
107
- ' GH_TOKEN: ${{ secrets.GITHUB_REPOSITORY_ADMIN_TOKEN }}',
107
+ ' GH_TOKEN: ${{ secrets.NIMI_REPOSITORY_ADMIN_TOKEN }}',
108
108
  ' shell: bash',
109
109
  ' run: |',
110
110
  ' test -n "$GH_TOKEN"',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimiplatform/app-tools",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Public app-authoring CLI for Nimi App projects.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "nimiScaffoldVersions": {
21
21
  "sdkVersion": "^0.8.0",
22
- "appToolsVersion": "^0.2.2",
22
+ "appToolsVersion": "^0.2.4",
23
23
  "nimicodingVersion": "0.6.1",
24
24
  "aiSdkVersion": "^6.0.85",
25
25
  "kitVersion": "^0.4.0",
@@ -17,7 +17,7 @@ const WINDOWS_APP_MANIFEST: &str = r#"
17
17
  version="6.0.0.0"
18
18
  processorArchitecture="*"
19
19
  language="*"
20
- publicKeyToken="6595b64144ccf1df" /> <!-- pragma: allowlist secret -- public Microsoft Common Controls token -->
20
+ publicKeyToken="6595b64144ccf1df" /> <!-- pragma: allowlist secret; public Microsoft Common Controls token. -->
21
21
  </dependentAssembly>
22
22
  </dependency>
23
23
  </assembly>