Artifact operations
To access the artifact operations, the selected Object Type for the script must be Artifact. The object contains artifact data and helper methods.
Type artifact. in the script line to see the available operations.
Operation | Description |
---|---|
|
Returns an array of attachment metadata objects. The attachment metadata objects are not visible in the script editor type-ahead. |
|
Returns the date that the artifact was created. |
|
Returns the artifact description. |
|
Returns artifact properties.
You can set relating_incidents, scan_option, and summary. This operation does not apply to artifacts of the type Observed Data, and is available in Python 3 only. |
|
Returns the content of matches with intelligence threat feeds. |
|
Returns the artifact ID. |
|
Returns the incident ID. |
|
Returns properties of an IP artifact, such as 'source': False , and
'destination': True . |
|
Returns the time that the artifact was last modified. |
|
Returns the value that determines whether the artifact is configured to show a relationship between incidents when they contain the same artifact. |
|
Returns the artifact type. |
|
Returns the artifact's value. |
|
Adds a hit to an artifact that you provide. You must provide a name, value, and type for each
property. The type must be a string, number, uri, ip, or lat_lng. Within value, you can use
This operation does not support the Observed Data artifact type, and is available in Python 3 only. The hit must be defined as a list of dictionaries before you use this operation. See the example after the table. |
|
Adds one or more tags to an artifact, except for the Observed Data artifact type. This operation is available in Python 3 only. |
|
Returns the artifact's tags, except for the Observed Data artifact type. This method is available in Python 3 only. |
|
Returns those artifacts with the tags that you specify. It does not return tags from artifacts with the type of Observed Data. This method is available in Python 3 only. |
|
Returns the incident script object that owns this artifact. |
|
Deletes one or more tags to from artifact, except for the Observed Data artifact type. This method is available in Python 3 only. |
# This link contains further information on the site status of the url that is being checked
LINK_URL = "https://www.google.com/transparencyreport/safebrowsing/diagnostic/#url={}"
if results.success:
if results.content:
resp = results.content
hit = []
for match in resp.get("matches", []):
linkurl = match["threat"]["url"]
link = LINK_URL.format(match["threat"]["url"])
hit = [
{
"name": "Threat Type",
"type": "string",
"value": "{}".format(match["threatType"])
},
{
"name": "Report Link",
"type": "uri",
"value": "{}".format(link)
},
{
"name": "Platform Type",
"type": "string",
"value": "{}".format(match["platformType"])
},
{
"name": "URL Name",
"type": "string",
"value": "{}".format(linkurl)
}
]
artifact.addHit("Google Safe Browsing Function", hit)
else:
incident.addNote("Google Safe Browsing url check failed: {}".format(results.reason))