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.
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.
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
[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:
Go to the
Scans History
section in the Pynt Dashboard.Locate the relevant scan in the scan history.
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.
Last updated