Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM mcr.microsoft.com/devcontainers/base:2.0-ubuntu-24.04

# Build arguments
ARG CLAUDE_CODE_OAUTH_TOKEN

Check warning on line 4 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Generate SBOM

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "CLAUDE_CODE_OAUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 4 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Trivy Container Scan

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "CLAUDE_CODE_OAUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG ANTHROPIC_API_KEY

Check warning on line 5 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Generate SBOM

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "ANTHROPIC_API_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 5 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Trivy Container Scan

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "ANTHROPIC_API_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG IMAGE_VERSION="dev"

# OCI Image Labels for version tracking
Expand All @@ -26,6 +26,7 @@
wget \
xz-utils \
shellcheck \
bats \
python3 \
python3-pip \
python3-venv \
Expand Down
21 changes: 12 additions & 9 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# pnpm security settings
# Strict peer dependency resolution - fail on conflicts
strict-peer-dependencies=true

# Auto-install missing peer dependencies
auto-install-peers=true

# npm security settings
# Run security audit on install
audit=true
audit-level=moderate

# ============================================================
# pnpm-specific settings (ignored by npm, used when pnpm is detected)
# ============================================================
# Strict peer dependency resolution - fail on conflicts
# strict-peer-dependencies=true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep pnpm security flags enabled for pnpm installs

Commenting out strict-peer-dependencies (and related pnpm flags) removes those protections for pnpm as well, because commented .npmrc entries are never read by any package manager. In this repo we still execute pnpm commands (for example in .devcontainer/Dockerfile), so peer dependency conflicts that were previously blocked can now be silently accepted during dependency resolution, which weakens the intended supply-chain/consistency guardrails.

Useful? React with 👍 / 👎.


# Auto-install missing peer dependencies
# auto-install-peers=true

# Prevent phantom dependencies (packages hoisting to root node_modules)
shamefully-hoist=false
# shamefully-hoist=false

# Use content-addressable storage (pnpm default - integrity verification)
verify-store-integrity=true
# verify-store-integrity=true
Comment on lines +6 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What is pnpm's recommended way to keep strict-peer-dependencies, auto-install-peers, shamefully-hoist, and verify-store-integrityenabled for pnpm without npm warning about unknown.npmrc settings?

💡 Result:

pnpm’s recommended way to avoid npm warnings about pnpm-only config keys is to move those settings out of the project .npmrc and into the project-level pnpm-workspace.yaml, which pnpm reads for configuration but npm does not. pnpm explicitly supports reading config from pnpm-workspace.yaml in addition to .npmrc. [1]

Example pnpm-workspace.yaml:

# pnpm-workspace.yaml
strictPeerDependencies: true
autoInstallPeers: true
shamefullyHoist: true
verifyStoreIntegrity: true

These exact settings are documented as supported pnpm-workspace.yaml keys (note the camelCase names). [1]


🏁 Script executed:

# Check if pnpm-workspace.yaml exists
fd -t f "pnpm-workspace.yaml" .

Repository: keito4/config

Length of output: 78


🏁 Script executed:

# Check the .npmrc file to see the exact settings
cat -n .npmrc

Repository: keito4/config

Length of output: 833


🏁 Script executed:

# Check the pnpm-workspace.yaml file
cat -n pnpm-workspace.yaml

Repository: keito4/config

Length of output: 381


Migrate pnpm safeguards from .npmrc to pnpm-workspace.yaml instead of disabling them.

Commenting out Lines 10, 13, 16, and 19 disables pnpm's peer-dependency, hoisting, and store-integrity checks. The repo still provisions pnpm in .devcontainer/Dockerfile and workflows rely on these settings (.github/workflows/templates/unified-ci.yml:84-89), so weakening them affects all pnpm installs.

Rather than comment them out, move these settings to pnpm-workspace.yaml using the camelCase format that pnpm-workspace supports:

  • strictPeerDependencies: true
  • autoInstallPeers: true
  • shamefullyHoist: false
  • verifyStoreIntegrity: true

This avoids npm warnings while keeping pnpm safeguards active across the repo.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.npmrc around lines 6 - 19, Remove the commented pnpm settings from .npmrc
and re-add them in pnpm-workspace.yaml using pnpm-workspace's camelCase keys:
strictPeerDependencies: true, autoInstallPeers: true, shamefullyHoist: false,
and verifyStoreIntegrity: true; ensure the four keys are top-level in
pnpm-workspace.yaml so pnpm installs and CI workflows (which expect these
safeguards) honor them and npm no longer emits warnings from the .npmrc
comments.