Usage of hard-coded passport secret

Description

Code is not a safe place to store secrets, use environment variables instead.

Remediations

Use environment variables instead

  const strategy = new GoogleStrategy({ clientSecret: process.ENV.GOOGLE_SECRET });
passport.use(strategy);

Resources

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=javascript_third_parties_passport_hardcoded_secret

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=javascript_third_parties_passport_hardcoded_secret