diff --git a/scripts/check-security.mjs b/scripts/check-security.mjs index a05af8531e..4eee776d90 100644 --- a/scripts/check-security.mjs +++ b/scripts/check-security.mjs @@ -29,8 +29,15 @@ * 3. Blocks installation if a compromised package is found * * Cache: Results are cached locally for 24 hours to avoid slowing down installs. + * + * Set ADF_SKIP_SECURITY_CHECK=1 to disable (useful for CI environments). */ +if (process.env.ADF_SKIP_SECURITY_CHECK === '1' || process.env.ADF_SKIP_SECURITY_CHECK === 'true') { + console.log('🔒 ADF Security Check: Skipped (ADF_SKIP_SECURITY_CHECK=1)\n'); + process.exit(0); +} + import { readFileSync, writeFileSync, mkdirSync, rmSync, statSync } from 'node:fs'; import { join, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; diff --git a/scripts/preinstall-check.mjs b/scripts/preinstall-check.mjs index db7edfb87f..3f417ab987 100644 --- a/scripts/preinstall-check.mjs +++ b/scripts/preinstall-check.mjs @@ -26,8 +26,15 @@ * * Checking package.json catches new dependencies added during upgrades * (e.g., nx migrate) before the lockfile is updated. + * + * Set ADF_SKIP_SECURITY_CHECK=1 to disable (useful for CI environments). */ +if (process.env.ADF_SKIP_SECURITY_CHECK === '1' || process.env.ADF_SKIP_SECURITY_CHECK === 'true') { + console.log('🔒 ADF Security Check: Skipped (ADF_SKIP_SECURITY_CHECK=1)\n'); + process.exit(0); +} + import { readFileSync, mkdirSync, writeFileSync } from 'node:fs'; import { join, dirname } from 'node:path'; import { fileURLToPath } from 'node:url';