# How to tag a scan in Pynt

Adding tags to your Pynt scans allows for better organization and traceability. These tags are visible in the Pynt Dashboard and can help identify scans based on context, such as the current Git commit or branch.

### Using the Pynt CLI to Add Tags

To tag a scan, use the `--tag` option with your Pynt CLI command. You can add multiple tags by repeating the `--tag` option.

#### Example 1: Add the Current Git Short Hash as a Tag

You can include the current Git commit hash as a tag to track the scan's association with a specific code state.

```bash
pynt [COMMAND] [OPTIONS] --tag $(git rev-parse --short HEAD)
```

In this example:

* `$(git rev-parse --short HEAD)` dynamically retrieves the short hash of the current Git commit.
* The hash is added as a tag to the scan.

#### Example 2: Add the Git Branch Name as a Tag

Similarly, you can tag a scan with the name of the current Git branch to reflect the source branch of the code.

```bash
pynt [COMMAND] [OPTIONS] --tag $(git rev-parse --abbrev-ref HEAD)
```

In this example:

* `$(git rev-parse --abbrev-ref HEAD)` retrieves the name of the current branch.
* The branch name is added as a tag to the scan.

#### General Syntax

```bash
pynt [COMMAND] [OPTIONS] --tag <tag> --tag <another-tag>
```

* `[COMMAND]`: The specific Pynt command you wish to execute.
* `[OPTIONS]`: Additional options for the command.
* `<tag>`: The tag you wish to add. Replace with a meaningful label or value.

You can add multiple tags by including the `--tag` option multiple times. All tags will be displayed in the Pynt Dashboard.

### Viewing Tags in the Pynt Dashboard

After running a scan with tags:

<figure><img src="/files/1cNfKLv0jIXLjt2vvRb0" alt=""><figcaption></figcaption></figure>

1. Go to the `Scans History` section in the Pynt Dashboard.
2. Locate the relevant scan in the scan history.
3. Tags will be displayed alongside the scan details.

Additionally, you can view the tags in the `Last Scan` area of the application page.

Using tags effectively can greatly enhance your ability to organize and track scans in Pynt.


---

# 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://docs.pynt.io/documentation/api-security-testing/how-to/how-to-tag-a-scan-in-pynt.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.
