sonatype-nexus-community / auditjs

Audits an NPM package.json file to identify known vulnerabilities.
https://www.npmjs.com/package/auditjs
Apache License 2.0
224 stars 53 forks source link

[FEATURE] Read credentials from environment variables #228

Open bhamail opened 3 years ago

bhamail commented 3 years ago

Should also allow for reading credentials from environment variables. For consistency, should follow the same naming as nancy, eg:

export OSSI_USERNAME=auser@anemailaddress.com
export OSSI_TOKEN=A4@k3@p1T0k3n

and for IQ:

export OSSI_USERNAME=auser@anemailaddress.com
export OSSI_TOKEN=A4@k3@p1T0k3n
export IQ_USERNAME=nondefaultuser
export IQ_TOKEN=yourtoken
export IQ_SERVER=http://adifferentserverurl:port

cc @bhamail / @DarthHater / @allenhsieh / @ken-duck

instinet-lewis-boon commented 3 years ago

This would be helpful for us, but I would note that the Nexus IQ for Gitlab CI integration uses NEXUS_IQ_USERNAME and NEXUS_IQ_PASSWORD.

Edit: Fixing link