Skip to content

Commit 2a5eba3

Browse files
authored
Add nodejsscan (#530)
Signed-off-by: Mihai Criveti <[email protected]>
1 parent d2ae534 commit 2a5eba3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,10 @@ tomllint: ## 📑 TOML validation (tomlcheck)
709709
# =============================================================================
710710
# help: 🕸️ WEBPAGE LINTERS & STATIC ANALYSIS (HTML/CSS/JS lint + security scans + formatting)
711711
# help: install-web-linters - Install HTMLHint, Stylelint, ESLint, Retire.js & Prettier via npm
712-
# help: lint-web - Run HTMLHint, Stylelint, ESLint, Retire.js and npm audit
712+
# help: nodejsscan - Run nodejsscan for JS security vulnerabilities
713+
# help: lint-web - Run HTMLHint, Stylelint, ESLint, Retire.js, nodejsscan and npm audit
713714
# help: format-web - Format HTML, CSS & JS files with Prettier
714-
.PHONY: install-web-linters lint-web format-web
715+
.PHONY: install-web-linters nodejsscan lint-web format-web
715716

716717
install-web-linters:
717718
@echo "🔧 Installing HTML/CSS/JS lint, security & formatting tools..."
@@ -726,7 +727,12 @@ install-web-linters:
726727
retire \
727728
prettier
728729

729-
lint-web: install-web-linters
730+
nodejsscan:
731+
@echo "🔒 Running nodejsscan for JavaScript security vulnerabilities..."
732+
$(call ensure_pip_package,nodejsscan)
733+
@$(VENV_DIR)/bin/nodejsscan --directory ./mcpgateway/static || true
734+
735+
lint-web: install-web-linters nodejsscan
730736
@echo "🔍 Linting HTML files..."
731737
@npx htmlhint "mcpgateway/templates/**/*.html" || true
732738
@echo "🔍 Linting CSS files..."
@@ -748,7 +754,6 @@ format-web: install-web-linters
748754
"mcpgateway/static/**/*.css" \
749755
"mcpgateway/static/**/*.js"
750756

751-
752757
################################################################################
753758
# 🛡️ OSV-SCANNER ▸ vulnerabilities scanner
754759
################################################################################

0 commit comments

Comments
 (0)