Repository navigation
Description
English
Context
Maka is a local-first desktop agent that executes commands, manages API keys and OAuth credentials, starts subprocesses, and distributes signed desktop installers.
A compromised dependency or GitHub Action can therefore affect build infrastructure, signing credentials, release artifacts, and ultimately user machines. The repository already limits dependency install scripts and uses a lockfile, but it does not yet have a complete supply-chain security baseline.
This tracking issue records the evidence, decisions, delivery scope, and completion boundary for that baseline. Implementation details belong in independently reviewable child issues and pull requests.
Reference projects
No single reference project defines Maka's complete configuration. The decisions below select the relevant practices for Maka's npm/Electron architecture and signed-release risk.
Current evidence
- Maka has 11 npm workspaces and a root lockfile containing 992 package entries, including 971 registry-resolved entries.
- The repository has five GitHub Actions workflow files and 41 external Action references across six Action families.
- No Action reference is pinned to an immutable commit SHA.
- The desktop release workflow has
contents: write, enters thereleaseenvironment, accesses signing credentials, and produces signed release artifacts. - The release workflow runs
npm audit --omit=dev --audit-level=high, but no scheduled or dependency-change audit workflow exists. - An audit against the official npm registry currently reports a moderate ReDoS advisory in the transitive
[email protected]dependency. - The existing high-severity release audit does not block that advisory.
npm audit signatures --omit=devsucceeds against the current production dependency graph, verifying 354 registry signatures and 59 attestations.- No Dependabot or CodeQL configuration is present.
- Existing controls include
package-lock.json,npm ci,allowScripts,patch-package, and knip.
Decisions
| Area | Decision | Reason |
|---|---|---|
| GitHub Actions | Pin every external Action to a full commit SHA and retain its version as a comment | Mutable tags are unnecessary risk in privileged build and release workflows |
| Dependency updates | Use Dependabot for the root npm workspace and GitHub Actions on a weekly schedule | Native GitHub support is sufficient for the current single npm ecosystem |
| Dependency grouping | Group minor and patch updates; keep major updates separate | Reduces update noise without hiding high-risk major changes |
| Vulnerability auditing | Run production npm audit at moderate severity daily and when dependency inputs change |
Detects both newly disclosed vulnerabilities and unsafe dependency updates |
| Registry verification | Run npm audit signatures --omit=dev with dependency auditing |
Provides registry integrity verification without introducing another scanner |
| Release gate | Apply the same moderate audit threshold before signed packaging begins | Prevents scheduled checks and release policy from enforcing different standards |
| Static analysis | Use buildless CodeQL for javascript-typescript and GitHub Actions |
Covers source and workflow risks not detected by npm audit, TypeScript, or linting |
| Dependabot auto-merge | Defer | Branch protection and approval policy are not confirmed; minor and patch releases can still be malicious |
| New-package cooling | Do not implement in this pass | The reference implementation is Bun-specific and npm has no native equivalent |
| Additional scanners | Do not add Renovate, Snyk, OSV Scanner, or Semgrep | Native npm and GitHub capabilities cover the initial baseline with less operational complexity |
Delivery tracking
-
Pin all GitHub Actions to immutable commit SHAs.
Child issue/PR: chore(security): pin actions and configure Dependabot #2212
-
Configure Dependabot for npm and GitHub Actions.
Child issue/PR: chore(security): pin actions and configure Dependabot #2212
-
Add continuous production dependency auditing and registry signature verification, including resolution of the current moderate advisory.
Child issue/PR: ci(security): add continuous dependency audit #2223
-
Add CodeQL analysis for TypeScript and GitHub Actions. Deferred; see the closing comment.
Decision: defer until maintainers have capacity to triage findings or a concrete security risk raises its priority.
Invariants
- Keep each security capability independently reviewable and revertible.
- Keep scheduled security work separate from the main affected-surface CI workflow.
- Do not expose release signing credentials to dependency-audit or CodeQL jobs.
- Use minimum required GitHub token permissions.
- Do not silently convert registry, advisory-service, or signature-verification failures into success.
- Preserve
allowScripts,patch-package, knip, and the existing lockfile discipline. - Do not enable Dependabot auto-merge as part of the initial baseline.
- Do not add a new security service when native npm or GitHub functionality covers the requirement.
Out of scope
- Replacing npm with Bun or another package manager.
- Introducing Renovate, Snyk, OSV Scanner, or Semgrep.
- Implementing a custom minimum-release-age checker.
- Automatically approving or merging Dependabot pull requests.
- Refactoring application code unrelated to a concrete security finding.
Completion
Close this tracking issue when:
- every delivery item links to a merged pull request or has an explicit recorded decision to defer;
- every external GitHub Action reference is pinned to an immutable commit SHA;
- Dependabot maintains npm dependencies and GitHub Actions;
- production dependency vulnerabilities and registry signatures are checked daily and when dependency inputs change;
- the release path blocks moderate-or-higher production advisories before signed packaging begins;
- CodeQL analyzes TypeScript and GitHub Actions on the agreed triggers, or has an explicit recorded decision to defer;
- the current moderate dependency advisory is resolved or explicitly documented;
- all new workflows use minimum required permissions and have a verified green baseline.
简体中文
背景
Maka 是本地优先的桌面 agent,会执行命令、管理 API key 和 OAuth 凭证、启动子进程,并分发已签名的桌面安装包。
被入侵的依赖或 GitHub Action 可能影响构建基础设施、签名凭证、release 产物,并最终影响用户机器。仓库目前已经限制依赖安装脚本并使用 lockfile,但还没有形成完整的供应链安全基线。
这个 tracking issue 记录本轮证据、决策、交付范围和关闭边界。具体实现细节由可独立 review 的 child issues 和 pull requests 记录。
参考项目
没有一个参考项目单独定义 Maka 的完整配置。以下决策只采用与 Maka 的 npm/Electron 架构和签名发布风险直接相关的实践。
当前证据
- Maka 有 11 个 npm workspaces;根 lockfile 包含 992 个 package 条目,其中 971 个来自 registry。
- 仓库有 5 个 GitHub Actions workflow,共使用 41 个外部 Action,涉及 6 类 Action。
- 当前没有任何 Action 引用固定到不可变 commit SHA。
- 桌面 release workflow 拥有
contents: write,进入releaseenvironment,接触签名凭证并生成已签名产物。 - release workflow 执行
npm audit --omit=dev --audit-level=high,但没有 scheduled 或依赖变更触发的审计 workflow。 - 使用 npm 官方 registry 实测时,当前传递依赖
[email protected]存在一个 moderate ReDoS advisory。 - 现有 high 阈值的 release audit 不会阻止该 advisory。
npm audit signatures --omit=dev可以在当前生产依赖图上运行,验证了 354 个 registry signatures 和 59 个 attestations。- 当前没有 Dependabot 或 CodeQL 配置。
- 现有控制包括
package-lock.json、npm ci、allowScripts、patch-package和 knip。
决策
| 领域 | 决策 | 原因 |
|---|---|---|
| GitHub Actions | 将所有外部 Action 固定到完整 commit SHA,并使用注释保留版本 | 可变 tag 会给特权构建和 release workflow 带来不必要的风险 |
| 依赖更新 | 使用 Dependabot 每周维护根 npm workspace 和 GitHub Actions | GitHub 原生能力足以覆盖当前单 npm 生态 |
| 依赖分组 | 合并 minor 和 patch 更新,major 更新保持独立 | 减少更新噪声,同时保留高风险 major 变更的可见性 |
| 漏洞审计 | 每日以及依赖输入变化时,以 moderate 阈值运行 production npm audit |
同时发现新披露漏洞和不安全的依赖更新 |
| Registry 验证 | 与依赖审计一起执行 npm audit signatures --omit=dev |
不引入额外 scanner 即可验证 registry 完整性 |
| Release gate | 在签名打包开始前使用相同的 moderate audit 阈值 | 避免 scheduled 检查和 release 执行不同安全标准 |
| 静态分析 | 对 javascript-typescript 和 GitHub Actions 使用 buildless CodeQL |
覆盖 npm audit、TypeScript 和 lint 无法发现的源码及 workflow 风险 |
| Dependabot auto-merge | 延期 | 分支保护和审批策略尚未确认;minor 和 patch 更新仍可能包含恶意代码 |
| 新包发布冷却 | 本轮不实现 | 参考实现依赖 Bun,npm 没有原生等价能力 |
| 其他 scanner | 不引入 Renovate、Snyk、OSV Scanner 或 Semgrep | npm 与 GitHub 原生能力能以更低运营复杂度覆盖首批基线 |
交付跟踪
-
将所有 GitHub Actions 固定到不可变 commit SHA。
子 issue/PR:chore(security): pin actions and configure Dependabot #2212
-
为 npm 和 GitHub Actions 配置 Dependabot。
子 issue/PR:chore(security): pin actions and configure Dependabot #2212
-
添加持续生产依赖审计和 registry signature verification,并处理当前 moderate advisory。
子 issue/PR:ci(security): add continuous dependency audit #2223
-
为 TypeScript 和 GitHub Actions 添加 CodeQL 分析。已延期,参见关闭评论。
决定:等维护者有能力处理扫描结果,或出现具体安全风险并提高其优先级时再重新评估。
不变约束
- 每项安全能力都必须能够独立 review 和回滚。
- Scheduled security work 与主 affected-surface CI workflow 保持独立。
- Dependency audit 和 CodeQL job 不接触 release 签名凭证。
- GitHub token 使用最小必要权限。
- Registry、advisory service 或签名验证失败时不得静默放行。
- 保留
allowScripts、patch-package、knip 和现有 lockfile 纪律。 - 首批基线不启用 Dependabot auto-merge。
- npm 或 GitHub 原生能力已经覆盖需求时,不新增安全服务。
不在范围内
- 将 npm 替换为 Bun 或其他 package manager。
- 引入 Renovate、Snyk、OSV Scanner 或 Semgrep。
- 自定义 minimum-release-age 检查器。
- 自动审批或合并 Dependabot pull requests。
- 重构与具体安全发现无关的应用代码。
完成条件
满足以下条件后关闭本 tracking issue:
- 每个交付项都链接到 merged pull request,或有明确记录的延期决定;
- 每个外部 GitHub Action 引用都固定到不可变 commit SHA;
- Dependabot 持续维护 npm 依赖和 GitHub Actions;
- 每日以及依赖输入变化时检查生产依赖漏洞和 registry signatures;
- release 路径在签名打包开始前阻止 moderate 及以上生产依赖 advisory;
- CodeQL 按约定触发分析 TypeScript 和 GitHub Actions,或已有明确记录的延期决定;
- 当前 moderate 依赖 advisory 已解决或有明确记录;
- 所有新增 workflow 都使用最小必要权限,并建立经过验证的绿色基线。
Activity
test(ci): accept pinned artifact action
chore(security): pin actions and add Dependabot
ci(security): add dependency audit
ci(security): add dependency audit
chore(security): pin actions and add Dependabot (#2212)
ci(security): add dependency audit
ci(security): add dependency audit
ci(security): add dependency audit
ci(security): add dependency audit (#2223)
Colafornia commentedon Aug 20, 2026
The initial supply-chain security baseline is complete through #2212 and #2223. These changes pin external Actions, configure Dependabot, add continuous production dependency auditing and registry verification, enforce the release audit threshold, and resolve the recorded moderate advisories.
CodeQL is deferred. Runtime Host stabilization, release reliability, and reducing automatic pull request runner usage have higher current priority. The repository already has dependency auditing, immutable Action pins, Dependabot, type checking, linting, and tests as its current baseline.
Revisit CodeQL when maintainers have capacity to triage its findings, or when a concrete source-code or workflow security risk increases its priority. This explicit deferral satisfies the tracking issue completion rule, so the issue can close.
Posted with Codex assistance.