-
Notifications
You must be signed in to change notification settings - Fork 0
added snapshot replay for percy #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 24068148 | Triggered | Generic High Entropy Secret | e4683cb | src/channelHandlers/browserstack-api.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
| return new Promise((resolve) => { | ||
| const { exec } = require('child_process'); | ||
|
|
||
| exec(`ps -o pid= -g ${pgid}`, (error: any, stdout: string) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
| const { exec } = require('child_process'); | ||
|
|
||
| // Look for common browser processes in the process group | ||
| exec(`ps -o pid=,comm= -g ${pgid}`, (error: any, stdout: string) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
| // Check if main process is still running | ||
| const { exec } = require('child_process'); | ||
|
|
||
| exec(`kill -0 ${session.mainProcess.pid}`, (error: any) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
| const child = spawn(command, { | ||
| shell: true, | ||
| env: { | ||
| ...process.env, | ||
| PERCY_TOKEN: PERCY_TOKEN, | ||
| BSTACK_LOCAL_KEY: BSTACK_LOCAL_KEY | ||
| }, | ||
| detached: true, // Create new process group | ||
| stdio: ['ignore', 'pipe', 'pipe'] | ||
| }); |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.spawn-shell-true.spawn-shell-true Error
| const optionsString = commandOptions.length > 0 ? ` ${commandOptions.join(' ')}` : ''; | ||
| const command = `npx percy support:debug "${snapshotUrl}"${optionsString}`; | ||
|
|
||
| const child = spawn(command, { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
| console.log('Graceful termination failed, using forceful termination'); | ||
|
|
||
| // Force kill the entire process group | ||
| exec(`kill -KILL -${session.processGroupId}`, (error2: any) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
|
|
||
| // Kill main process | ||
| killPromises.push(new Promise((killResolve) => { | ||
| exec(`kill -KILL ${session.mainProcess.pid}`, (killError: any) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
| // Kill all child processes | ||
| session.childProcesses.forEach(childPid => { | ||
| killPromises.push(new Promise((killResolve) => { | ||
| exec(`kill -KILL ${childPid}`, (killError: any) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
|
|
||
| // Wait a moment and check if processes are still running | ||
| setTimeout(() => { | ||
| exec(`kill -0 -${session.processGroupId}`, (checkError: any) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
| }); | ||
| } else { | ||
| // Still running, force kill | ||
| exec(`kill -KILL -${session.processGroupId}`, (forceError: any) => { |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
No description provided.