Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
njsscan — Node.js अनुप्रयोगों के लिए सिमैंटिक-अवेयर SAST स्कैनर जो libsast पैटर्न मिलान और semgrep सिंटैक्स-अवेयर विश्लेषण का उपयोग करके असुरक्षित कोड पैटर्न का पता लगाता है। | Kitploit
उपकरण/GitHubGitHub/ajinabraham/njsscan
स्थैतिक विश्लेषणभेद्यता स्कैनरकोड विश्लेषणवेब सुरक्षाDevSecOps
GitHubajinabraham/njsscan

njsscan

Node.js अनुप्रयोगों के लिए सिमैंटिक-अवेयर SAST स्कैनर जो libsast पैटर्न मिलान और semgrep सिंटैक्स-अवेयर विश्लेषण का उपयोग करके असुरक्षित कोड पैटर्न का पता लगाता है।

रिपॉजिटरी देखें
4361089 दिन पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें
वेबसाइट

njsscan

njsscan एक स्थैतिक अनुप्रयोग परीक्षण (SAST) उपकरण है जो libsast के सरल पैटर्न मिलानकर्ता और सिंटैक्स-जागरूक सिमेंटिक कोड पैटर्न खोज उपकरण semgrep का उपयोग करके आपके node.js अनुप्रयोगों में असुरक्षित कोड पैटर्न ढूंढ सकता है।

भारत में Love के साथ निर्मित Tweet

PyPI version platform License python Build

njsscan का समर्थन करें

  • Paypal के माध्यम से दान करें: Donate via Paypal
  • परियोजना को प्रायोजित करें: Github Sponsors

ई-लर्निंग पाठ्यक्रम और प्रमाणन

OpSecX Video Course OpSecX Node.js सुरक्षा: पेनटेस्टिंग और एक्सप्लॉयटेशन - NJS

स्थापना

pip install njsscan

इसके लिए Python 3.10+ आवश्यक है और यह केवल Mac और Linux का समर्थन करता है

कमांड लाइन विकल्प

root@kitploit:~
$ njsscan
usage: njsscan [-h] [--json] [--sarif] [--sonarqube] [--defectdojo] [--gitlab-sast] [--html] [-o OUTPUT] [-c CONFIG] [--missing-controls] [-w] [-v] [path ...]

positional arguments:
  path                  Path can be file(s) or directories with source code

optional arguments:
  -h, --help            show this help message and exit
  --json                set output format as JSON
  --sarif               set output format as SARIF 2.1.0
  --sonarqube           set output format compatible with SonarQube
  --defectdojo          set output format compatible with DefectDojo Generic Findings Import
  --gitlab-sast         set output format as GitLab SAST report
  --html                set output format as HTML
  -o OUTPUT, --output OUTPUT
                        output filename to save the result
  -c CONFIG, --config CONFIG
                        Location to .njsscan config file
  --missing-controls    enable missing security controls check
  -w, --exit-warning    non zero exit code on warning
  -v, --version         show njsscan version

उदाहरण उपयोग

root@kitploit:~
$ njsscan test.js
- Pattern Match ████████████████████████████████████████████████████████████ 1
- Semantic Grep ███████████████████████████ 160

njsscan: v0.1.9 | Ajin Abraham | opensecurity.in
╒═════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════╕
│ RULE ID     │ express_xss                                                                                   │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ OWASP       │ A1: Injection                                                                                 │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ CWE         │ CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')  │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ DESCRIPTION │ Untrusted User Input in Response will result in Reflected Cross Site Scripting Vulnerability. │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ SEVERITY    │ ERROR                                                                                         │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ FILES       │ ╒════════════════╤═══════════════════════════════════════════════╕                            │
│             │ │ File           │ test.js                                       │                            │
│             │ ├────────────────┼───────────────────────────────────────────────┤                            │
│             │ │ Match Position │ 5 - 46                                        │                            │
│             │ ├────────────────┼───────────────────────────────────────────────┤                            │
│             │ │ Line Number(s) │ 7: 8                                          │                            │
│             │ ├────────────────┼───────────────────────────────────────────────┤                            │
│             │ │ Match String   │ const { name } = req.query;                   │                            │
│             │ │                │     res.send('<h1> Hello :' + name + "</h1>") │                            │
│             │ ╘════════════════╧═══════════════════════════════════════════════╛                            │
╘═════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════╛

nodejsscan SAST

nodejsscan, जो njsscan के ऊपर निर्मित है, अन्य बेहतरीन एकीकरणों के साथ एक पूर्ण विकसित भेद्यता प्रबंधन उपयोगकर्ता इंटरफ़ेस प्रदान करता है।

nodejsscan web ui

देखें nodejsscan

Python API

root@kitploit:~
>>> from njsscan.njsscan import NJSScan
>>> node_source = '/node_source/true_positives/sqli_node.js'
>>> scanner = NJSScan([node_source], json=True, check_controls=False)
>>> scanner.scan()
{
    'templates': {},
    'nodejs': {
        'node_sqli_injection': {
            'files': [{
                'file_path': '/node_source/true_positives/sqli_node.js',
                'match_position': (1, 24),
                'match_lines': (4, 11),
                'match_string': 'var employeeId = req.foo;\n\nvar sql = "SELECT * FROM trn_employee WHERE employee_id = " + employeeId;\n\n\n\nconnection.query(sql, function (error, results, fields) {\n\n    if (error) {\n\n        throw error;\n\n    }\n\n    console.log(results);'
            }],
            'metadata': {
                'owasp': 'A1: Injection',
                'cwe': "CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
                'description': 'Untrusted input concatinated with raw SQL query can result in SQL Injection.',
                'severity': 'ERROR'
            }
        }
    },
    'errors': []
}

njsscan को कॉन्फ़िगर करें

स्रोत कोड निर्देशिका के रूट में एक .njsscan फ़ाइल आपको njsscan को कॉन्फ़िगर करने की अनुमति देती है। आप --config तर्क का उपयोग करके एक कस्टम .njsscan फ़ाइल का भी उपयोग कर सकते हैं।

root@kitploit:~
---
- nodejs-extensions:
  - .js

  template-extensions:
  - .new
  - .hbs
  - ''

  ignore-filenames:
  - skip.js

  ignore-paths:
  - __MACOSX
  - skip_dir
  - node_modules

  ignore-extensions:
  - .jsx

  ignore-rules:
  - regex_injection_dos
  - pug_jade_template

  severity-filter:
  - WARNING
  - ERROR

  severity-overrides:
    express_xss: WARNING
    node_secret: ERROR

निष्कर्षों को दबाएँ

आप जावास्क्रिप्ट स्रोत फ़ाइलों में निष्कर्षों को ट्रिगर करने वाली पंक्ति में // njsscan-ignore: rule_id1, rule_id2 टिप्पणी जोड़कर उन्हें दबा सकते हैं।

उदाहरण:

root@kitploit:~
app.get('/some/redirect', function (req, res) {
    var target = req.param("target");
    res.redirect(target); // njsscan-ignore: express_open_redirect
});

CI/CD एकीकरण

आप अपने CI/CD या DevSecOps पाइपलाइनों में njsscan को सक्षम कर सकते हैं।

Github Action

निम्नलिखित को .github/workflows/njsscan.yml फ़ाइल में जोड़ें।

root@kitploit:~
name: njsscan
on:
  push:
    branches: [ master, main ]
  pull_request:
    branches: [ master, main ]
jobs:
  njsscan:
    runs-on: ubuntu-latest
    name: njsscan check
    steps:
    - name: Checkout the code
      uses: actions/checkout@v7
    - uses: actions/setup-python@v7
      with:
        python-version: '3.12'
    - name: nodejsscan scan
      id: njsscan
      uses: ajinabraham/njsscan-action@master
      with:
        args: '.'

उदाहरण: njsscan github action के साथ dvna

Github कोड स्कैनिंग एकीकरण

निम्नलिखित को .github/workflows/njsscan_sarif.yml फ़ाइल में जोड़ें।

root@kitploit:~
name: njsscan sarif
on:
  push:
    branches: [ master, main ]
  pull_request:
    branches: [ master, main ]
jobs:
  njsscan:
    runs-on: ubuntu-latest
    name: njsscan code scanning
    steps:
    - name: Checkout the code
      uses: actions/checkout@v7
    - uses: actions/setup-python@v7
      with:
        python-version: '3.12'
    - name: nodejsscan scan
      id: njsscan
      uses: ajinabraham/njsscan-action@master
      with:
        args: '. --sarif --output results.sarif || true'
    - name: Upload njsscan report
      uses: github/codeql-action/upload-sarif@v3
      with:
        sarif_file: results.sarif

nodejsscan web ui

Gitlab CI/CD

निम्नलिखित को .gitlab-ci.yml फ़ाइल में जोड़ें।

root@kitploit:~
stages:
  - test

njsscan:
  image: python:3.12
  stage: test
  before_script:
    - pip3 install --upgrade njsscan
  script:
    - njsscan . --gitlab-sast -o gl-sast-report.json
  artifacts:
    reports:
      sast: gl-sast-report.json

उदाहरण कमांड (स्थानीय):

root@kitploit:~
njsscan . --gitlab-sast -o gl-sast-report.json

यह एक मूल GitLab SAST रिपोर्ट लिखता है, जिससे निष्कर्ष बिना SARIF कनवर्टर के Vulnerability Report / MR सुरक्षा विजेट में दिखाई देते हैं।

उदाहरण: njsscan gitlab के साथ dvna

Travis CI

निम्नलिखित को .travis.yml फ़ाइल में जोड़ें।

root@kitploit:~
language: python
install:
    - pip3 install --upgrade njsscan
script:
    - njsscan .

Circle CI

निम्नलिखित को .circleci/config.yaml फ़ाइल में जोड़ें

root@kitploit:~
version: 2.1
jobs:
  njsscan:
    docker:
      - image: cimg/python:3.9.6
    steps:
      - checkout
      - run:
          name: Install njsscan
          command: pip install --upgrade njsscan
      - run:
           name: njsscan check
           command: njsscan .

Docker

DockerHub से पूर्व-निर्मित इमेज

root@kitploit:~
docker pull opensecurity/njsscan
docker run -v /path-to-source-dir:/src opensecurity/njsscan /src

स्थानीय रूप से बनाएँ

root@kitploit:~
docker build -t njsscan .
docker run -v /path-to-source-dir:/src njsscan /src
टूल डाउनलोड करें