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

[MBOX] Remove credentials from origin and tag #1140

Merged
merged 1 commit into from
Apr 11, 2024
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
5 changes: 5 additions & 0 deletions grimoire_elk/raw/mbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from .elastic import ElasticOcean
from ..elastic_mapping import Mapping as BaseMapping
from ..enriched.utils import anonymize_url


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -79,3 +80,7 @@ def _fix_item(self, item):
for field in fields:
if field.lower().startswith("x-"):
item["data"].pop(field)

# Remove credentials from URL
item['origin'] = anonymize_url(item['origin'])
item['tag'] = anonymize_url(item['tag'])
7 changes: 7 additions & 0 deletions releases/unreleased/mbox-origin-url-anonymized.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: MBOX origin URL anonymized
category: fixed
author: Jose Javier Merchante <jjmerchante@bitergia.com>
issue: null
notes: >
Remove credentials from MBOX origin URL and tag fields.
Loading