Skip to content

[CHORE]: Add nodejsscan security scanner #499

@crivetimihai

Description

@crivetimihai

🧭 Chore Summary - Add nodejsscan to lint-web for JS security scanning

Add nodejsscan to perform static security scans on JavaScript files under mcpgateway/static.
Hook it into make lint-web so every frontend lint pass includes a security check for issues like eval usage, hardcoded secrets, and known JS risks.


🔧 Makefile Snippet

.PHONY: nodejsscan
nodejsscan:
	@echo "Running nodejsscan..."
	$(call ensure_pip_package,nodejsscan)
	@$(VENV_DIR)/bin/nodejsscan --directory ./mcpgateway/static --severity high,medium

lint-web: install-web-linters nodejsscan
	@echo "Running HTMLHint..."
	@npx htmlhint "mcpgateway/templates/**/*.html" || true
	@echo "Running Stylelint..."
	@npx stylelint "mcpgateway/static/**/*.css" || true
	@echo "Running ESLint..."
	@npx eslint "mcpgateway/static/**/*.js" || true
	@echo "Running retire.js..."
	@npx retire --path mcpgateway/static || true

Metadata

Metadata

Assignees

Labels

choreLinting, formatting, dependency hygiene, or project maintenance chorescicdIssue with CI/CD process (GitHub Actions, scaffolding)devopsDevOps activities (containers, automation, deployment, makefiles, etc)frontendFrontend development (HTML, CSS, JavaScript)securityImproves securitytriageIssues / Features awaiting triage

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions