# Project Threat Scan

Step 1. Auth Token Registration Description: The first step is to register with your auth token to generate an UUID.

{% tabs %}
{% tab title="Request" %}

```json
{
    "action": "message",
    "payload": {
        "type": "auth_token_register",
        "body": {
            "auth_token": "{Your_Auth_Token}"
        }
    }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "type": "auth_token_register",
    "request_uuid": "Your_UUID",
    "payload": {
        "message": "Auth token registered."
    },
    "event_timestamp": "2024-04-19 11:37:17.854547"
}
```

{% endtab %}
{% endtabs %}

Step 2. Now send the scan message a sample message Request & Response is shared below:

{% tabs %}
{% tab title="Payload" %}

```
{
    "action": "message",
    "payload": {
        "type": "private_project_threat_scan_initiate",
        "body": {
            "provider": "github",
            "project_url": "https://github.com/Shashank-In/SmartContract",
            "project_name": "SolidityScan",
            "project_type": "new",
            "project_branch": "main",
            "recur_scans": false,
            "project_visibility": "public",
            "skip_file_paths": []
        }
    }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "type": "scan_status",
    "request_uuid": "",
    "payload": {
        "scan_id": "8b1ba9304ce93594",
        "scan_status": "scan_done",
        "project_id": "7d5e7cda0fd5843b66537d4f380f5130",
        "scan_details": {
            "is_latest_scan": false,
            "webhook_enabled": false,
            "file_url_list": null,
            "multi_file_scan_status": "scan_done",
            "multi_file_scan_summary": {
                "issue_severity_distribution": {
                    "informational": 6,
                    "low": 9,
                    "medium": 2,
                    "high": 1,
                    "critical": 5,
                    "gas": 13
                },
                "scan_time_taken": 7,
                "score_v2": "0.50",
                "lines_analyzed_count": 44,
                "threat_score": "78.95"
            },
            "project_branch": "main",
            "project_id": "7d5e7cda0fd5843b66537d4f380f5130",
            "project_name": "SolidityScan",
            "project_url": "https://github.com/Shashank-In/SmartContract",
            "scan_id": "8b1ba9304ce93594",
            "scan_init_time": "2024-11-06T04:39:55.368811",
            "scan_status": "scan_done",
            "scan_status_err_msg": null,
            "scan_type": "project"
        }
    },
    "event_timestamp": "2024-11-06 04:40:04.592047"
}
```

{% endtab %}
{% endtabs %}
