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

bug-fix for context links #2962

Merged
merged 5 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions data/context_links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ hardcoded_modules:
## External Services
linked_services:
### Virustotal Example:
# virustotal_hash_lookup:
# short_name: 'VirusTotal'
# match_fields: ['hash', 'sha256_hash', 'sha256', 'sha1_hash', 'sha1', 'md5_hash', 'md5', 'url']
# validation_regex: '/^[0-9a-f]{64}$|^[0-9a-f]{40}$|^[0-9a-f]{32}$/i'
# context_link: 'https://www.virustotal.com/gui/search/<ATTR_VALUE>'
# redirect_warning: TRUE
virustotal_hash_lookup:
short_name: 'VirusTotal'
match_fields: ['hash', 'sha256_hash', 'sha256', 'sha1_hash', 'sha1', 'md5_hash', 'md5']
context_link: 'https://www.virustotal.com/gui/search/<ATTR_VALUE>'
redirect_warning: TRUE
2 changes: 1 addition & 1 deletion timesketch/api/v1/resources/contextlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get(self):
return jsonify(response)

# Support for earlier version format of context links without hardcoded modules:
if not context_link_yaml.get("linked_services"):
if "linked_services" not in context_link_yaml.keys():
context_link_yaml = {
"linked_services": context_link_yaml,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ limitations under the License.
</v-toolbar>

<v-card-subtitle class="pt-1">
<div class="mb-2"><b>Input:</b> {{ url }}</div>
<div v-if="nodeContext">
<div class="mb-2"><b>Input: </b><code class="code">{{ url }}</code></div>
<div v-if="unfurlReady">
<b>Selected node info: </b>
<span v-html="sanitizeHtml(nodeContext)"></span>
<code class="code" v-html="sanitizeHtml(nodeContext)"></code>
</div>
<div v-else>Select a node in the graph below to get more information.</div>
</v-card-subtitle>

<v-card-text>
Expand Down Expand Up @@ -260,6 +259,7 @@ export default {
mounted() {
window.addEventListener('resize', this.resizeCanvasWithDelay)
this.unfurlReady = false
this.nodeContext = this.nodeContextDefault
this.getUnfurlData(this.url)
this.cy = cytoscape({
container: this.$refs.cy,
Expand Down
Loading