cyphernetsecurity

cypherscan payload

by cyphernetsecurity
Other
v3
^3.0.0

Overview

Summary generated from the README

Adds an upload hook that sends each file to the CypherScan API through a presigned upload workflow and receives a scan verdict. Suspicious or malicious files are blocked before they become available in Payload. It requires Payload 3, Node.js 20 or newer, and a CypherScan API key.

Features

  • Presigned upload workflow for scanning files
  • Malware and secret detection
  • Automatic blocking of configurable verdicts
  • Fail-open or fail-closed behavior when the service is unavailable
  • Restrict scanning to specific upload collections
  • Scan activity logged through the Payload logger

Use cases

  • Block malware in files uploaded by editors or end users to a Payload media collection
  • Enforce strict upload security in production by failing closed when scans cannot complete

From the author

CypherScan upload security plugin for Payload CMS.

Installation

npm i cypherscan-payload

3

Stars

0

Forks

0

Open Issues

2 months ago

Last Updated

2

Weekly Downloads

v0.1.6

npm Version

18.8 KB

Unpacked Size

0

Dependencies

GitHub stars

Trends appear after 7 days of data. Daily snapshots have not started yet.

npm weekly downloads

Trends appear after 7 days of data. Daily snapshots have not started yet.

Each point is npm's rolling 7-day download count.

Health Score

56/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1265161598-root.svg)](https://payloaddirectory.dev/plugins/1265161598-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1265161598-root"><img src="https://payloaddirectory.dev/badge/1265161598-root.svg" alt="Payload Directory"></a>
Updated Aug 16, 2026Created Jun 10, 2026Published Aug 16, 2026

README

CypherScan for Payload

Protect Payload uploads before they reach production.

CypherScan securely scans every uploaded file using a presigned upload workflow and can automatically block suspicious or malicious files before they become available inside Payload CMS.


Features

  • Secure presigned upload workflow
  • Malware detection
  • Secret detection
  • Automatic malicious file blocking
  • Configurable fail-open / fail-closed behavior
  • Native Payload CMS integration
  • Collection targeting

Requirements

  • Payload CMS 3+
  • Node.js 20+
  • CypherScan API key

Installation

Install the plugin:

npm install cypherscan-payload

Configuration

Configure the plugin inside your Payload configuration:

import { cypherScanPayload } from "cypherscan-payload";

export default buildConfig({
  plugins: [
    cypherScanPayload({
      apiKey: process.env.CYPHERSCAN_API_KEY!,
      apiUrl: "https://cyphernetsecurity.com",
      failOpen: true,
    }),
  ],
});

Options

OptionDescription
apiKeyCypherScan API key
apiUrlCypherScan API base URL
collectionsRestrict scanning to specific upload collections
blockVerdictsVerdicts that should block uploads
failOpenEnable Fail Open mode

How it works

When a file is uploaded:

  1. The plugin requests a presigned upload URL from the CypherScan API.
  2. The file is uploaded securely to temporary object storage.
  3. CypherScan scans the uploaded object.
  4. A scan verdict is returned.
  5. Clean files remain available.
  6. Suspicious or malicious files are automatically blocked.

Architecture

User Upload
      │
      ▼
Payload Upload Hook
      │
      ▼
Request Presigned Upload URL
      │
      ▼
Temporary Secure Upload
      │
      ▼
CypherScan Scan
      │
      ▼
Verdict
      │
      ├── Clean ─────► Upload allowed
      │
      └── Blocked ───► Upload rejected

Example

Upload detected

        │

        ▼

Presigned Upload

        │

        ▼

CypherScan Scan

        │

        ▼

Verdict: Clean

        │

        ▼

File available inside Payload CMS

Fail Open / Fail Closed

CypherScan supports two operating modes.

Fail Open

Uploads continue if the scanning service is temporarily unavailable.

Recommended for development environments.

Fail Closed

Uploads are rejected when the scan cannot be completed.

Recommended for production environments requiring strict upload enforcement.


Logging

The plugin logs scan activity through the Payload logger.


Tested

Validated with:

  • Clean uploads
  • Malware detection (EICAR)
  • API unavailable (failOpen=true)
  • API unavailable (failOpen=false)
  • Collection targeting
  • Payload CMS 3.x

CypherScan Agent

Payload plugin scans use the canonical CypherScan API workflow:

  1. POST /api/v1/upload/presign
  2. Upload the file to the returned temporary URL
  3. POST /api/v1/scan with the returned objectKey

The plugin sends a stable client identity:

x-cypherscan-client: payload-plugin

With an active CypherScan Agent subscription, successful authenticated scans automatically become API_INTEGRATION Agent observations. No second Agent event call is required for normal Payload plugin scans.

Agent can then use those observations for meaningful-change detection, bounded verification, Controller attention decisions, alerts, and activity history.


Roadmap

  • Scan history
  • Detailed scan reports
  • Quarantine support
  • Policy-based upload rules

License

MIT License

Copyright (c) 2026 CypherNet Security Inc.

See the LICENSE file for details.


Built by CypherNet Security Inc.

Similar plugins