Scanning JavaScript/TypeScript NodeJS Projects
Fetch the latest agent image from an instance of Lineai, e.g.
docker pull lineai.com/lineai_javascriptRun the image, mounting the root of the project you wish to scan in a volume, e.g.
docker run \ --rm \ --interactive \ --tty \ --env LINEAI_HOST="https://lineai.com" \ --volume '/absolute/path/to/the/project:/scan' \ 'lineai.com/lineai_javascript' \ analyze \ --path /scan \ --application my-project-nameBy default, a new agent will be created in Lineai each time you run a scan. To avoid this, you can provide the container with credentials using the AGENT_UUID and AGENT_PASSWORD environment variables.
For example, the command above could be re-written to include credentials from the local shell environment:
# Assuming that `AGENT_UUID` and `AGENT_PASSWORD` have
# been exported and are available in the shell environment
docker run \ --rm \ --interactive \ --tty \ --env LINEAI_HOST="https://lineai.com" \ --env AGENT_UUID="${AGENT_UUID}" \ --env AGENT_PASSWORD="${AGENT_PASSWORD}" \ --volume '/absolute/path/to/the/project:/scan' \ 'lineai.com/lineai_javascript' \ analyze \ --path /scan \ --application my-project-nameFor a list of available commands and options, you can run
docker run \ --rm \ --interactive \ --tty \ 'lineai.com/lineai_javascript' analyze --help