Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation issues #26

Closed
wants to merge 14 commits into from
Closed
20 changes: 20 additions & 0 deletions .github/workflows/generate-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Generate Readme Doc
on:
workflow_dispatch:
push:
paths:
- '*.json'
- 'readme.html'
- 'manual_readme_content.md'
tags-ignore:
- '**'
branches-ignore:
- next
- main
jobs:
generate-doc:
runs-on: ubuntu-latest
steps:
- uses: 'phantomcyber/dev-cicd-tools/github-actions/generate-doc@main'
with:
GITHUB_TOKEN: ${{ secrets.SOAR_APPS_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/review-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Review Release
concurrency:
group: app-release
cancel-in-progress: true
permissions:
contents: read
id-token: write
statuses: write
on:
workflow_dispatch:
inputs:
task_token:
description: 'StepFunction task token'
required: true

jobs:
review:
uses: 'phantomcyber/dev-cicd-tools/.github/workflows/review-release.yml@main'
with:
task_token: ${{ inputs.task_token }}
secrets:
resume_release_role_arn: ${{ secrets.RESUME_RELEASE_ROLE_ARN }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/phantomcyber/dev-cicd-tools
rev: v1.13
rev: v1.16
hooks:
- id: org-hook
- id: package-app-dependencies
- repo: https://github.com/Yelp/detect-secrets
rev: v1.1.0
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--no-verify', '--exclude-files', '^domaintools_iris.json$']
858 changes: 431 additions & 427 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions domaintools_iris.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"license": "Copyright (c) 2019-2023 DomainTools, LLC",
"main_module": "domaintools_iris_connector.py",
"app_version": "1.4.0",
"utctime_updated": "2022-06-08T21:37:30.000000Z",
"utctime_updated": "2023-07-12T23:51:51.000000Z",
"product_vendor": "DomainTools",
"product_name": "DomainTools Iris Investigate",
"product_version_regex": ".*",
"min_phantom_version": "5.3.0",
"min_phantom_version": "5.5.0",
"python_version": "3",
"logo": "logo_domaintools_iris.svg",
"logo_dark": "logo_domaintools_iris_dark.svg",
Expand Down Expand Up @@ -717,10 +717,10 @@
"versions": "EQ(*)"
},
{
"action": "load search hash",
"action": "load hash",
"description": "Load or monitor Iris Investigate search results by Iris Investigate export hash",
"type": "investigate",
"identifier": "load_search_hash",
"identifier": "load_hash",
"read_only": true,
"parameters": {
"search_hash": {
Expand Down
28 changes: 20 additions & 8 deletions domaintools_iris_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import codecs
import json
import re

# Imports local to this App
import sys
from datetime import datetime, timedelta
Expand All @@ -17,7 +16,6 @@
import phantom.app as phantom
import requests
import tldextract

from domaintools import API
from phantom.action_result import ActionResult
from phantom.base_connector import BaseConnector
Expand All @@ -32,7 +30,7 @@ class DomainToolsConnector(BaseConnector):
ACTION_ID_REVERSE_IP = "reverse_lookup_ip"
ACTION_ID_REVERSE_EMAIL = "reverse_whois_email"
ACTION_ID_REVERSE_DOMAIN = "reverse_lookup_domain"
ACTION_ID_LOAD_SEARCH_HASH = "load_search_hash"
ACTION_ID_LOAD_HASH = "load_hash"

def __init__(self):
# Call the BaseConnectors init first
Expand Down Expand Up @@ -343,8 +341,8 @@ def handle_action(self, param):
ret_val = self._reverse_whois_email(param)
elif action_id == self.ACTION_ID_REVERSE_DOMAIN:
ret_val = self._reverse_lookup_domain(param)
elif action_id == self.ACTION_ID_LOAD_SEARCH_HASH:
ret_val = self._load_search_hash(param)
elif action_id == self.ACTION_ID_LOAD_HASH:
ret_val = self._load_hash(param)

return ret_val

Expand Down Expand Up @@ -459,12 +457,26 @@ def _reverse_lookup_domain(self, param):
for a in data[0]["mx"]:
if "ip" in a:
for b in a["ip"]:
ips.append({"ip": b["value"], "type": "MX IP", "count": b["count"], "count_string": self._convert_null_value_to_empty_string(b["count"])})
ips.append(
{
"ip": b["value"],
"type": "MX IP",
"count": b["count"],
"count_string": self._convert_null_value_to_empty_string(b["count"])
}
)

for a in data[0]["name_server"]:
if "ip" in a:
for b in a["ip"]:
ips.append({"ip": b["value"], "type": "NS IP", "count": b["count"], "count_string": self._convert_null_value_to_empty_string(b["count"])})
ips.append(
{
"ip": b["value"],
"type": "NS IP",
"count": b["count"],
"count_string": self._convert_null_value_to_empty_string(b["count"])
}
)

sorted_ips = sorted(
ips,
Expand Down Expand Up @@ -538,7 +550,7 @@ def _reverse_whois_email(self, param):
param.update(updates)
return self._pivot_action(param)

def _load_search_hash(self, param):
def _load_hash(self, param):
param_hash = param.get("search_hash") or ""
data = {
"pivot_type": "search_hash",
Expand Down
37 changes: 0 additions & 37 deletions release_notes/release_notes.html

This file was deleted.