首页
/ Raptor 项目安装与使用教程

Raptor 项目安装与使用教程

2024-09-24 13:53:15作者:鲍丁臣Ursa

1. 项目目录结构及介绍

Raptor 项目的目录结构如下:

raptor-master/
├── backend/
│   ├── confs/
│   └── rules/
├── frontend/
├── screenshots/
├── LICENSE
├── README.md
├── install.sh
├── shutdown.sh
└── start.sh

目录介绍:

  • backend/:包含后端服务的配置文件和规则文件。
    • confs/:存放后端服务的配置文件。
    • rules/:存放扫描规则文件。
  • frontend/:包含前端用户界面文件。
  • screenshots/:存放项目截图。
  • LICENSE:项目的开源许可证文件。
  • README.md:项目的介绍和使用说明。
  • install.sh:项目的安装脚本。
  • shutdown.sh:项目的关闭脚本。
  • start.sh:项目的启动脚本。

2. 项目的启动文件介绍

start.sh

start.sh 是 Raptor 项目的启动脚本。执行该脚本可以启动后端服务,使项目进入运行状态。

sudo sh start.sh

启动后,可以通过浏览器访问 http://localhost/raptor/ 来使用 Raptor 的 Web 界面。

3. 项目的配置文件介绍

backend/confs/

backend/confs/ 目录下存放了后端服务的配置文件。这些配置文件用于定义服务的运行参数和行为。

backend/rules/

backend/rules/ 目录下存放了扫描规则文件。这些规则文件定义了如何检测代码中的漏洞。用户可以通过编辑这些规则文件来添加或修改扫描规则。

配置文件示例

以下是一个规则文件的示例:

[
  {
    "plugin_type": "plugin_name",
    "file_types": [
      ".java",
      ".js"
    ],
    "rules": [
      {
        "id": "HARD_CRED1",
        "severity": "High",
        "title": "Title of the Issue",
        "description": "This text here shall be reflected in the UI as description of the issue.",
        "remediation": "The text here shall be reflected in the UI as the steps to remediate the issue",
        "link": "Any URL that has more resources about the issue.",
        "example_insecure": "Put the insecure version of the code snippet for learning purpose.",
        "example_secure": "Put the secure version of the code snippet for learning purpose.",
        "platform_version": "all",
        "enabled": "true",
        "logic": "Explain the logic behind this rule for future updation or customization",
        "signature": "base64encode(regexp)"
      }
    ]
  }
]

该配置文件定义了一个扫描规则,用于检测代码中的特定漏洞。用户可以根据需要修改或添加新的规则。

通过以上步骤,您可以成功安装、启动并配置 Raptor 项目,开始使用其强大的代码漏洞扫描功能。

登录后查看全文
热门项目推荐