Skip to content

chore: promote dev to staging — audit hardening#71

Merged
himerus merged 6 commits intostagingfrom
dev
Mar 16, 2026
Merged

chore: promote dev to staging — audit hardening#71
himerus merged 6 commits intostagingfrom
dev

Conversation

@himerus
Copy link
Copy Markdown
Contributor

@himerus himerus commented Mar 16, 2026

Dev → Staging Promotion

Promotes the deep antagonistic audit (PR #70) and version bump to staging.

Commits

Key fixes included

  • 4 security path traversal fixes
  • TagNameSchema regex, config.ts circular override, health.ts bare catches
  • Stale config references, MCP server version bump
  • Test quality hardening

🤖 Generated with Claude Code

himerus and others added 6 commits March 16, 2026 18:08
…s fixes

Security (critical):
- audit_library outputPath had zero validation, enabling arbitrary file writes
- audit-report.ts now enforces path containment within projectRoot

Correctness:
- TagNameSchema regex allowed invalid custom elements without hyphens for
  prefixes lacking a trailing hyphen (e.g. "hx" accepted "hxfoo")
- config.ts: config file could override projectRoot (circular dependency)
- health.ts: TAG_NAME_ALLOWLIST_REGEX /i flag contradicted lowercase-only docs
- health.ts: two legacy fallback bare catches swallowed EACCES errors
  (readLatestHistoryFile + getHealthTrend) — now check ENOENT specifically
- event-architecture.ts: rounding could produce scores > 100, added clamp
- tokens.ts: flattenNode had no depth limit (stack overflow on deep input)
- Missing tools/library.js barrel export in packages/core/src/index.ts

Staleness:
- cdn.ts called deprecated loadCdnCem() → loadLibrary()
- MCP server version hardcoded as '0.1.0' → '0.4.0'
- MCP error messages referenced deprecated mcpwc.config.json → helixir.mcp.json
- CLI init wizard wrote deprecated mcpwc.config.json → helixir.mcp.json

All verification gates pass: build, type-check, lint (0 errors),
60 test files / 1509 tests passed / 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove conditional `if (trend.dimensionTrends)` guards that silently
  skipped assertions when the feature was broken — now assert defined first
- Tighten averageScore assertion from "between 0 and 100" to toBeCloseTo(50)
  for a test that mixes 100 + 0 scores
- Rename misleading "grade calculation" describe block in dispatcher tests
  to "grade passthrough" — the test injects grades via mock, it doesn't
  verify grade computation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mixin-resolver.ts and source-accessibility.ts resolve file paths from
CEM module/superclass/mixin declarations without verifying the resolved
path stays within projectRoot. A crafted CEM (e.g. via CDN load_library)
could specify paths like "../../../../etc/passwd" to exfiltrate file
contents through tool responses.

Both files now check candidate paths against projectRoot + sep before
reading, rejecting any path that escapes the project boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-audit-full-system-bug

Deep antagonistic audit: full-system bug fix and architectural hardening sweep
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (4)
  • AUDIT
  • audit
  • Deep Audit
  • deep-audit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 409ffa36-365a-4aca-b024-0704a44c0a2b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@himerus himerus merged commit 84c2a16 into staging Mar 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant