microsoft / microsoft/vscode

Add --json output support to check-allow-scripts script

Open
#334,134 0 comments 0 reactions 1 assignee Claimed by @lszomoru View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Feature Details
Add support for the `--json` flag in `build/npm/check-allow-scripts.ts` to output pending install script check results in JSON format.

This enables better automation, CI/CD pipeline integration, and machine-readable result parsing when auditing unreviewed install scripts across package directories.

## Implementation
- Added argument checking for `--json` in the `main()` function.
- Formatted output as a structured JSON string when the flag is present while preserving the exit code behavior (`exitCode = 1`) when pending scripts are found.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.