Skip to main content

fuscan

极速通用文件扫描器.

PyPI CI Python License Coverage

基于 YAML 规则的多格式文件内容扫描工具,支持 CLI 与 GUI(PySide2 + QML)。可扫描 PDF、Office 文档、压缩包等多种格式,按文件名/内容/路径匹配并支持 AND/OR/NOT 逻辑组合。

特性

  • 规则引擎:YAML 配置规则,支持文件名、文件内容、路径三类匹配目标,contains/equals/regex 等多种模式,AND/OR/NOT 逻辑组合
  • 多格式支持:PDF、DOCX、PPTX、XLSX、ODT/ODS、WPS、纯文本,及 ZIP/RAR 压缩包内扫描
  • 两种使用形态:
    • CLI:scan/rules/gui/cache/version 子命令,支持 text/json/csv 输出
    • GUI:PySide2 + QML 极简界面(Sidebar + ContentArea),实时进度、结果分类、详情预览、关键词高亮
  • 内置通用规则:随包分发 8 条安全规则,用户规则可覆盖
  • 多规则合并:支持加载多个规则文件,按顺序链式合并,后者覆盖前者同名规则

安装

pip install fuscan

或使用 uv:

uv add fuscan

GUI 需要 PySide2,项目锁定 Python 3.10(PySide2 官方 wheel 支持上限)。

快速上手

CLI

# 扫描指定路径(默认使用内置通用规则)
fuscan scan /path/to/scan

# 使用自定义规则文件,输出 JSON 报告
fuscan scan /path/to/scan -r rules/custom.yaml -o json -f report.json

# 加载多个规则文件(后者覆盖前者同名规则)
fuscan scan /path/to/scan -r base.yaml -r override.yaml

# 校验规则文件格式
fuscan rules -r rules/custom.yaml

# 启动 GUI
fuscan gui

GUI

fuscan gui

GUI 提供 GitHub Desktop 风格界面:模式卡片选择扫描范围(全盘/盘符/文件夹)、规则文件列表管理、实时进度反馈(当前文件/已扫描/命中/错误/已用时)、结果分类展示与详情预览(关键词高亮)、扫描结果导出(CSV/JSON)。

规则配置

规则文件为 YAML 格式,详见 rules/example.yaml:

version: "1.0"

ignore_dirs:
  - .git
  - node_modules

rules:
  # 文件名匹配
  - name: 敏感文件名检测
    severity: warning
    match:
      type: filename
      mode: contains
      pattern: password

  # 内容正则匹配
  - name: AWS 密钥泄露检测
    severity: critical
    match:
      type: content
      mode: regex
      pattern: 'AKIA[0-9A-Z]{16}'

  # AND 逻辑组合:配置文件含敏感词
  - name: 配置文件敏感词
    severity: warning
    match:
      type: and
      children:
        - type: filename
          mode: regex
          pattern: '\.(conf|ini|ya?ml)$'
        - type: content
          mode: contains
          pattern: password

更多场景化规则示例见 rules/examples/。

开发

# 安装开发依赖
uv sync --extra dev

# 全套门禁(lint + typecheck + coverage)
make check

# 运行测试
uv run pytest -m "not slow" --cov=fuscan --cov-fail-under=96

# 构建 Sphinx 文档
make doc

# 多版本测试(tox)
make tox

更多 Make 快捷命令运行 make help 查看。

许可证

MIT

Metadata

Release files for fuscan 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fuscan 0.3.8
File Size Uploaded Provenance Actions
fuscan-0.3.8.tar.gz 1.4 MB Without provenance Details for fuscan-0.3.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fuscan 0.3.8
File Interpreter ABI Platform Actions
fuscan-0.3.8-py3-none-any.whl Python 3 none any Details for fuscan-0.3.8-py3-none-any.whl

Total release size: 2.4 MB

Release files / fuscan-0.3.8.tar.gz

Download URL fuscan-0.3.8.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
f38302bd0676ccbc6fd70e8f5ff9eab9f9559f378549b60d6f50e30528cd7ce4
BLAKE2b-256 checksum
How to use checksums
1cb74371d948d4af9fe92b003726b2416da723996b5e92264f30c00cf96b30c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fuscan-0.3.8-py3-none-any.whl

Download URL fuscan-0.3.8-py3-none-any.whl
Size 977.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46f45d1361e41ae7cde51e07ff892f39a3a2095630177d63931a835b3388c6cc
BLAKE2b-256 checksum
How to use checksums
e06f5ef28ec5845cf9ff5524f61dafbef162c85676ec47b8a8841938702fe5cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fuscan 0.3.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page