Skip to content

Commit

Permalink
fix(job): protect variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjeneer committed May 1, 2023
1 parent dcb2b8c commit 5dd2d27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ dbs-up:

dbs-down:
docker-compose -f ${DOCKER_COMPOSE_FILE_DB} down

configure:
for id in $(docker ps | tr -s ' ' | cut -d ' ' -f1 | tail -n +2); do; docker network connect vulnscanner $id; done;
2 changes: 1 addition & 1 deletion src/services/jobs/scansStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const periodicityMapping = {}

const init = async () => {
console.log(`[JOBS][SCAN][INIT] Initializating scan jobs...`)
const scans = await getScansWithProbes()
const scans = await getScansWithProbes() || []
for (const scan of scans) {
if (scan.periodicity !== 'ONCE') {
const scanTask = cron.schedule(scan.periodicity, () => restartScan(scan))
Expand Down

0 comments on commit 5dd2d27

Please sign in to comment.