# Project 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="Request" %}

```json
{
  "action": "message",
  "payload": {
    "type": "private_project_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",
    "payload": {
        "scan_id": "c96d55c76addf7b5",
        "scan_status": "scan_done",
        "project_id": "2675bc38cf338a95fff27b6ce10416ec",
        "scan_details": {
            "link": "https://credshields-prod.s3.amazonaws.com/private_scan_details/1cd6dbff65e1521d.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR53KSZKUQRM7COPC%2F20240213%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20240213T144752Z&X-Amz-Expires=60000&X-Amz-SignedHeaders=host&X-Amz-Signature=3fa904170f79ad4ee0f91f12de28ed2f6b8cc44aef2d37d72039d4cb9f2d9a04"
        }
    },
    "event_timestamp": "2024-02-13 14:47:52.232403"
}
```

{% endtab %}
{% endtabs %}

1. **provider**: The provider of the project repository. In this case, it is `github`, indicating that the project is hosted on GitHub. Other supported values `bitbucket` & `gitlab`
2. **project\_url**: The URL of the project repository. It points to the GitHub repository where the SolidityScan project is hosted. Users can navigate to this URL to access the project's source code and other details.
3. **project\_name**: The name of the project. This can be any name under 50 characters. In this case, it is "SolidityScan", indicating the name of the project hosted on GitHub.
4. **project\_type**: Specifies the type of project. This is of two types `new` (A new scan)& to `existing` perform a rescan on an existing project.
5. **project\_branch**: This can be any existing branch that needs to be scanned.
6. **recur\_scans**: A boolean (`true` or `false`) value indicating whether recursive scans are enabled for the project. In this case, it is set to "false", suggesting that recursive scans are not enabled.
7. **project\_visibility**: Indicates the visibility level of the project repository accepts value `public` or `private`. For the private repository, the user needs to configure private repository support from the integration page at <https://solidityscan.com/integrations>.
8. **skip\_file\_paths**: An array of file paths or patterns to skip during scanning or processing. It is currently an empty array, indicating that no file paths are skipped during scans.

The scan data can be fetched from the S3 bucket. The JSON of the scan data sample can be found below.

{% file src="/files/OXJqXCCKX4JgB65CvSbh" %}
Scan Data Response
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidoc.solidityscan.com/solidityscan-security-api/getting-started/apis/solidityscan-private-api/websocket-api/project-scan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
