npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hawk-soar-app-sentinelone-capture-sample

v1.0.0

Published

SentinelOne threat file capture integration for HAWK.io SOAR

Downloads

79

Readme

hawk-soar-app-sentinelone-capture-sample

SentinelOne threat file capture app for HAWK.io SOAR.

This app migrates the Python flow in threat_fetch_file.py to Node.js:

  1. request file fetch from SentinelOne by content hash
  2. resolve download URL from activities
  3. download the file bytes
  4. persist the file for investigation (do not discard)

Transport

This app is invoked through the SOAR websocket stream handler (cmd + route message format).

  • No HTTP GET/POST endpoints are exposed by this app.
  • registerRoutes is intentionally empty.

Websocket route

  • capture (aliases: fetch, download)

Inputs (message.data)

Required integration fields:

  • group_id
  • credential_id
  • action_id
  • case_id
  • token

File selector (one required):

  • filename (or fileName, file_name)
  • contentHash (or fileContentHash, sha1, hash)
  • body (treated as filename unless it looks like a hash)

Optional:

  • password (default: MySecretPass123!)
  • activityLimit (default: 1000)

Example: capture by filename

{
  "id": "1",
  "cmd": "hawk-soar-app-sentinelone-capture-sample",
  "route": "capture",
  "data": {
    "group_id": "grp-root",
    "credential_id": "#12:0",
    "action_id": "#13:0",
    "case_id": "#45:0",
    "token": "session-token",
    "filename": "suspicious.dll"
  }
}

Example: capture by hash

{
  "id": "2",
  "cmd": "hawk-soar-app-sentinelone-capture-sample",
  "route": "capture",
  "data": {
    "group_id": "grp-root",
    "credential_id": "#12:0",
    "action_id": "#13:0",
    "case_id": "#45:0",
    "token": "session-token",
    "contentHash": "3bf8eabdef9dd1790917b648d4d52a5089afd9a7"
  }
}

Websocket response shape

Success:

{
  "id": "1",
  "cmd": "hawk-soar-app-sentinelone-capture-sample",
  "route": "capture",
  "status": true,
  "code": 200,
  "details": "Successfully captured SentinelOne threat file and saved investigation artifact.",
  "data": {
    "filename": "suspicious.dll",
    "contentHash": "3bf8eabdef9dd1790917b648d4d52a5089afd9a7",
    "sha256": "....",
    "sizeBytes": 12345,
    "localPath": "/tmp/hawk-sentinelone-captures/....-suspicious.dll",
    "storedAsArtifact": true,
    "storage": {
      "backend": "quarantine.set",
      "expires": "-1",
      "includesBase64": true
    }
  }
}

Failure:

{
  "id": "1",
  "cmd": "hawk-soar-app-sentinelone-capture-sample",
  "route": "capture",
  "status": false,
  "code": 500,
  "details": "error message"
}

Output

Successful response message.data includes:

  • filename
  • contentHash
  • sha256
  • sizeBytes
  • localPath
  • storedAsArtifact
  • storage

Investigation retention behavior

This app preserves the downloaded file for continued investigation by:

  • writing a local copy to /tmp/hawk-sentinelone-captures
  • storing file metadata and full file_content_base64 using quarantine.set
  • forcing non-expiration (expires = -1) on the saved record

Operational note

Because dynamic app exports currently provide quarantine.set (not artefacts.set), persisted investigation evidence is stored through the quarantine record path.