[PR #321] [MERGED] Add scanning and harden Agent package builds #910

Closed
opened 2026-10-20 17:32:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/321
Author: @SpicyMarinara
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/security-quality-scan


📝 Commits (8)

  • 59cfd24 ci: add security-and-quality scanning
  • 72a403e build: pin regression runner
  • 96c6f3c security: harden agent packages and catalog builds
  • 26dfd34 Merge remote-tracking branch 'origin/staging' into agent/security-quality-scan
  • a9cc1f6 chore: resolve agent quality findings
  • 0af0a98 ci: separate security and quality scans
  • d1f72cb security: close catalog review gaps
  • 6c6a7e8 build: reject malformed prerelease names

📊 Changes

37 files changed (+1485 additions, -223 deletions)

View changed files

➕ .github/dependabot.yml (+16 -0)
➕ .github/workflows/codeql.yml (+46 -0)
📝 .github/workflows/pull-request-checks.yml (+7 -0)
📝 .github/workflows/pull-request-triage.yml (+1 -1)
➕ .github/workflows/security-audit.yml (+34 -0)
📝 CONTRIBUTING.md (+1 -1)
📝 SECURITY.md (+3 -2)
➕ artifacts/long-term-memory-1.2.6.zip (+0 -0)
📝 catalog/catalog.json (+9 -9)
📝 catalog/v2/catalog.json (+9 -9)
📝 catalog/v3/catalog.json (+9 -9)
📝 package-lock.json (+531 -1)
📝 package.json (+6 -3)
📝 packages/long-term-memory/client.js (+7 -7)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+37 -37)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemorySettings.tsx (+1 -1)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx (+0 -17)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/bm25.ts (+30 -13)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/draft-store.ts (+2 -3)

...and 17 more files

📄 Description

Closes #320

Why this change

  • Marinara Agents had no CodeQL or native Code Quality baseline, so package security regressions could land without automated analysis.
  • Manual review found two real, capability-preserving hardening opportunities: reserved object keys could crash Long-Term Memory indexing, and catalog manifests could direct maintainer build scripts through unsafe paths or symlinks.
  • The initial native Code Quality baseline also found mechanical dead stores/imports in maintained package and build source.

What changed

  • Add scheduled, push, and pull-request CodeQL security analysis for JavaScript/TypeScript and GitHub Actions, alongside native Code Quality analysis.
  • Add low-severity lockfile auditing and bounded Dependabot updates targeting staging.
  • Enable native GitHub Code Quality for JavaScript/TypeScript.
  • Correct the malformed actions/labeler v6.0.1 commit pin and replace an undeclared npx runner with locked test dependencies.
  • Publish Long-Term Memory 1.2.6 with Map/own-property-safe indexing that preserves ordinary and reserved user-authored keys.
  • Validate package IDs, semantic versions, portable relative paths, canonical containment, symlink boundaries, and ZIP members before catalog build/validation I/O.
  • Remove only scanner-confirmed unused assignments/imports/helpers in maintained LTM/build/test source, then rebuild the downloadable package.
  • Update the LTM lifecycle regression to use Engine's reviewed version-and-checksum install contract.
  • Run the new security regressions in the required Catalog validation job.

Package and security impact

  • Affected package ID: long-term-memory, 1.2.5 to 1.2.6
  • Engine compatibility impact: none; the existing >=2.4.1 <4.0.0 range is unchanged
  • New or changed Agent permissions/entrypoints: none
  • User capacity/import impact: none; reserved memory keys are now retained safely rather than rejected
  • Restart behavior: unchanged; Engine will offer the normal package update and existing restart prompt
  • Other Agents: no runtime, manifest, prompt, tool, permission, or catalog-membership changes

Validation

  • npm run test:security
  • npm run test:noodle:regressions
  • node scripts/test-catalog-lanes.mjs
  • node scripts/validate-package-locales.mjs
  • node scripts/validate-catalog.mjs
  • npm audit --package-lock-only --audit-level=low
  • Long-Term Memory storage, extraction, runtime, routes, debug-log, UI, and lifecycle regressions
  • Exact 1.2.5 -> 1.2.6 install/update/restart/activation proof against current Engine staging
  • git diff --check
  • Review every finding from the final CodeQL and native Code Quality runs
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually click through Download Agents to install/update Long-Term Memory 1.2.6 from an Engine staging checkout and restart when prompted.
  • Confirm the final CodeQL run uploads Actions and JavaScript/TypeScript analyses.
  • Confirm dependency audit and Dependabot target staging.
  • Triage findings without removing supported Agent imports, permissions, or local-first utilities.

Automated update proof installed the real 1.2.5 artifact, created durable data, discovered and installed the exact 1.2.6 checksum, restarted active/ready, loaded both runtime entrypoints, retained the data, and reported no pending update. The current 1.2.6 lifecycle regression also covers offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation.

Documentation impact

  • No documentation changes needed
  • Updated repository security and contribution guidance
  • Updated linked Marinara Engine documentation

UI evidence

Not applicable; no Agent UI layout or copy changed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/321 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/13/2026 **Status:** ✅ Merged **Merged:** 8/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/security-quality-scan` --- ### 📝 Commits (8) - [`59cfd24`](https://github.com/Pasta-Devs/Marinara-Agents/commit/59cfd24f0cda5b49675c8afb369deb6136a12245) ci: add security-and-quality scanning - [`72a403e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/72a403e21f9a435509d90d06bef363c065c9f1c9) build: pin regression runner - [`96c6f3c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/96c6f3c006ce890254392703b50e07cf67faf6fb) security: harden agent packages and catalog builds - [`26dfd34`](https://github.com/Pasta-Devs/Marinara-Agents/commit/26dfd34fb46b9fbab093c89301f507dfe534ef2d) Merge remote-tracking branch 'origin/staging' into agent/security-quality-scan - [`a9cc1f6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a9cc1f6dd966f04711bab44eef71b4de1b07c142) chore: resolve agent quality findings - [`0af0a98`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0af0a98cd64a029e39b49330a685926254c76f40) ci: separate security and quality scans - [`d1f72cb`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d1f72cb37bd7c3a568c3347a93124569adc634f9) security: close catalog review gaps - [`6c6a7e8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6c6a7e8a6c9f1b75f0dc06331ec951bc850b63d0) build: reject malformed prerelease names ### 📊 Changes **37 files changed** (+1485 additions, -223 deletions) <details> <summary>View changed files</summary> ➕ `.github/dependabot.yml` (+16 -0) ➕ `.github/workflows/codeql.yml` (+46 -0) 📝 `.github/workflows/pull-request-checks.yml` (+7 -0) 📝 `.github/workflows/pull-request-triage.yml` (+1 -1) ➕ `.github/workflows/security-audit.yml` (+34 -0) 📝 `CONTRIBUTING.md` (+1 -1) 📝 `SECURITY.md` (+3 -2) ➕ `artifacts/long-term-memory-1.2.6.zip` (+0 -0) 📝 `catalog/catalog.json` (+9 -9) 📝 `catalog/v2/catalog.json` (+9 -9) 📝 `catalog/v3/catalog.json` (+9 -9) 📝 `package-lock.json` (+531 -1) 📝 `package.json` (+6 -3) 📝 `packages/long-term-memory/client.js` (+7 -7) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+37 -37) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemorySettings.tsx` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx` (+0 -17) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/bm25.ts` (+30 -13) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/draft-store.ts` (+2 -3) _...and 17 more files_ </details> ### 📄 Description Closes #320 ## Why this change - Marinara Agents had no CodeQL or native Code Quality baseline, so package security regressions could land without automated analysis. - Manual review found two real, capability-preserving hardening opportunities: reserved object keys could crash Long-Term Memory indexing, and catalog manifests could direct maintainer build scripts through unsafe paths or symlinks. - The initial native Code Quality baseline also found mechanical dead stores/imports in maintained package and build source. ## What changed - Add scheduled, push, and pull-request CodeQL security analysis for JavaScript/TypeScript and GitHub Actions, alongside native Code Quality analysis. - Add low-severity lockfile auditing and bounded Dependabot updates targeting staging. - Enable native GitHub Code Quality for JavaScript/TypeScript. - Correct the malformed actions/labeler v6.0.1 commit pin and replace an undeclared npx runner with locked test dependencies. - Publish Long-Term Memory 1.2.6 with Map/own-property-safe indexing that preserves ordinary and reserved user-authored keys. - Validate package IDs, semantic versions, portable relative paths, canonical containment, symlink boundaries, and ZIP members before catalog build/validation I/O. - Remove only scanner-confirmed unused assignments/imports/helpers in maintained LTM/build/test source, then rebuild the downloadable package. - Update the LTM lifecycle regression to use Engine's reviewed version-and-checksum install contract. - Run the new security regressions in the required Catalog validation job. ## Package and security impact - Affected package ID: long-term-memory, 1.2.5 to 1.2.6 - Engine compatibility impact: none; the existing >=2.4.1 <4.0.0 range is unchanged - New or changed Agent permissions/entrypoints: none - User capacity/import impact: none; reserved memory keys are now retained safely rather than rejected - Restart behavior: unchanged; Engine will offer the normal package update and existing restart prompt - Other Agents: no runtime, manifest, prompt, tool, permission, or catalog-membership changes ## Validation - [ ] npm run test:security - [ ] npm run test:noodle:regressions - [ ] node scripts/test-catalog-lanes.mjs - [ ] node scripts/validate-package-locales.mjs - [ ] node scripts/validate-catalog.mjs - [ ] npm audit --package-lock-only --audit-level=low - [ ] Long-Term Memory storage, extraction, runtime, routes, debug-log, UI, and lifecycle regressions - [ ] Exact 1.2.5 -> 1.2.6 install/update/restart/activation proof against current Engine staging - [ ] git diff --check - [ ] Review every finding from the final CodeQL and native Code Quality runs - [ ] Read and followed CONTRIBUTING.md ### Manual verification notes - Manually click through Download Agents to install/update Long-Term Memory 1.2.6 from an Engine staging checkout and restart when prompted. - Confirm the final CodeQL run uploads Actions and JavaScript/TypeScript analyses. - Confirm dependency audit and Dependabot target staging. - Triage findings without removing supported Agent imports, permissions, or local-first utilities. Automated update proof installed the real 1.2.5 artifact, created durable data, discovered and installed the exact 1.2.6 checksum, restarted active/ready, loaded both runtime entrypoints, retained the data, and reported no pending update. The current 1.2.6 lifecycle regression also covers offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated repository security and contribution guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence Not applicable; no Agent UI layout or copy changed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#910
No description provided.