Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4e8aa97
First commit
iforrest Feb 6, 2020
1db1553
Initial commit
iforrest Feb 6, 2020
1428fa8
Merge branch 'master' of github.com:iforrest/utbox
iforrest Feb 6, 2020
eb4b7a1
add splunk test matrix
dfederschmidt Oct 21, 2021
64a6509
add demo command
dfederschmidt Oct 21, 2021
e972d8b
escaping
dfederschmidt Oct 21, 2021
331f390
add python.version key to transforms
dfederschmidt Oct 21, 2021
98d31f8
add appinspect api test
dfederschmidt Oct 21, 2021
60659e5
add appinspect api test
dfederschmidt Oct 21, 2021
bb17061
add appinspect api test
dfederschmidt Oct 21, 2021
8ff9c3e
set to current splunkbase version
dfederschmidt Oct 21, 2021
3c41dbc
test python3 transforms
dfederschmidt Nov 30, 2021
e5156ba
add makefile
dfederschmidt Nov 30, 2021
630a566
initial take
dfederschmidt Dec 16, 2021
22951ff
some examples
dfederschmidt Dec 16, 2021
7174468
some development notes
dfederschmidt Dec 16, 2021
e316590
Create LICENSE
mayurah Feb 15, 2022
6eb0324
fix mozilla list loading and add unittest
dfederschmidt Jun 1, 2022
174bbff
remove matrix + add env var
dfederschmidt Jun 1, 2022
dd5577a
create logfile
dfederschmidt Jun 1, 2022
7bc60fd
add error handling for case where there is no url field
dfederschmidt Jun 1, 2022
4439a83
remove unused imports
dfederschmidt Jun 1, 2022
37d5d15
add fallback if logger instantiation fails
dfederschmidt Jun 3, 2022
4cd887b
Merge pull request #2 from splunk/fix_mozilla
dfederschmidt Jun 3, 2022
9cacbd6
bump version
dfederschmidt Jun 3, 2022
c156de5
Update README.md
mayurah Sep 30, 2022
5f43f40
add docker compose and how to run test
dfederschmidt Oct 23, 2022
e2330a0
small addition
dfederschmidt Oct 23, 2022
8947c9f
added log max size & backup count
dw-seanelliott Jun 21, 2023
b4efca4
bump version
dw-seanelliott Jun 21, 2023
296953d
Merge pull request #9 from satellite-no/log-rotate-bug
ggokdemir Jun 22, 2023
7bb717d
Update README.md
ggokdemir Aug 25, 2023
553f7ab
Merge pull request #10 from splunk/github_actions_update
ggokdemir Aug 25, 2023
9092069
Create static
ggokdemir Aug 21, 2024
406a976
Delete utbox/static
ggokdemir Aug 21, 2024
143b467
Add icons
ggokdemir Aug 21, 2024
52e6a97
Add appIcons
ggokdemir Aug 21, 2024
1b43098
Delete utbox/static/icons
ggokdemir Aug 21, 2024
f8db838
Merge pull request #11 from splunk/icon_update
ggokdemir Sep 8, 2024
441175c
Add Splunk version 9.3
ggokdemir Oct 20, 2024
a729d95
CI: run unit tests on Python 3.13
ricardom-splunk Nov 16, 2026
509d864
Merge pull request #17 from splunk/fdse-3595-fix-ci
ricardom-splunk Nov 16, 2026
af73fb9
chore: merge utbox history from splunk/utbox
ricardom-splunk Nov 17, 2026
9f564ea
docs: add URL Toolbox content to README and docs
ricardom-splunk Nov 17, 2026
eca0e50
ci: adopt the org layout and pipelines
ricardom-splunk Nov 17, 2026
42d5eee
fix: declare Python 3.13 requirement on all external lookups (1.9.5)
ricardom-splunk Nov 16, 2026
8ea4208
style: lint and format the Python code with the org ruff config
ricardom-splunk Nov 17, 2026
6a130d7
test: use pytest and the org tests layout
ricardom-splunk Nov 17, 2026
878e817
build: add app.manifest as in the org repository structure
ricardom-splunk Nov 17, 2026
2165978
docs: replace the PDF product guide with markdown and add the 1.9.5 c…
ricardom-splunk Nov 17, 2026
4a5f8a6
chore: remove the navigation file, the app has no user interface
ricardom-splunk Nov 20, 2026
840065f
ci: run tests only on pull requests that touch the package or the tests
ricardom-splunk Nov 20, 2026
579d2a2
docs: address review feedback on the README, docs and changelog
ricardom-splunk Nov 20, 2026
90aa08e
ci: keep polling while Splunk restarts instead of failing on the firs…
ricardom-splunk Nov 20, 2026
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
87 changes: 87 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Tests

on:
pull_request:
branches:
- main
Comment thread
edro15 marked this conversation as resolved.
Resolved
types: [opened, reopened, synchronize]
paths:
- package/**
- tests/**

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unittest:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install test dependencies
run: pip install pytest
- name: Run unit tests
run: python -m pytest tests

splunk-test:
name: Lookups on Splunk ${{ matrix.version }}
runs-on: ubuntu-latest
needs: unittest
strategy:
fail-fast: false
matrix:
version:
- 10.0.1 # renovate: datasource=docker depName=splunk/splunk
- 9.3.0 # renovate: datasource=docker depName=splunk/splunk
env:
SPLUNK_HOST: https://localhost:8089
SPLUNK_USER: admin
SPLUNK_PASSWORD: password # pragma: allowlist secret
services:
splunk:
image: splunk/splunk:${{ matrix.version }}
env:
SPLUNK_START_ARGS: --answer-yes --no-prompt --accept-license
SPLUNK_GENERAL_TERMS: --accept-sgt-current-at-splunk-com
SPLUNK_PASSWORD: password # pragma: allowlist secret
options: >-
--health-interval 10s
--health-timeout 5s
--health-retries 20
--health-cmd "curl -sk https://localhost:8089/services/server/info -u admin:password -o /dev/null -w '%{http_code}' | grep -q 200"
--health-start-period 30s
ports:
- 8000:8000
- 8089:8089
steps:
- uses: actions/checkout@v7
- name: Copy the app to the Splunk container
run: docker cp package ${{ job.services.splunk.id }}:/opt/splunk/etc/apps/utbox
- name: Restart Splunk and wait for it to be up
run: |
curl -sk -u "${SPLUNK_USER}:${SPLUNK_PASSWORD}" "${SPLUNK_HOST}/services/server/control/restart" -X POST
sleep 30
for i in {1..60}; do
code=$(curl -sk -o /dev/null -w "%{http_code}" -u "${SPLUNK_USER}:${SPLUNK_PASSWORD}" "${SPLUNK_HOST}/services/server/info" || true)
if [ "${code}" -eq 200 ]; then
echo "Splunk is up (attempt ${i})"
exit 0
fi
echo "Attempt ${i}/60: HTTP ${code}, waiting 5s"
sleep 5
done
echo "Splunk did not become ready"
exit 1
- name: Check the app is installed and enabled
run: |
curl -sk -u "${SPLUNK_USER}:${SPLUNK_PASSWORD}" "${SPLUNK_HOST}/services/apps/local/utbox?output_mode=json" \
| jq -e '.entry[0].content | (.disabled | not)'
- name: Run a search for each lookup
run: ./tests/splunk_smoke.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ build/
# Pre-commit
.ruff-cache
.python-version

# Local packaging output (make package)
dist/
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.9.5] - 2026-11-17

### Changed
- Declare `python.required = 3.13` on all 8 external lookups, so the Python interpreter is explicit. Lookup results are unchanged.
- The project moved from `splunk/utbox` to `splunk-platform-apps/url_toolbox` with its full commit history, and follows the organization structure and pipelines. The app ID is still `utbox`.
- The documentation is in `docs/readme.md`. It replaces the PDF product guide.

### Fixed
- Remove a stray `print()` in `ut_presets.py` that wrote to the standard output inside an external lookup. In 1.9.4 and earlier, `ut_suites` wrote each preset name of its `set` argument into the lookup output between the CSV rows. Nothing should depend on that output; lookup results are otherwise unchanged.
- Use raw strings for four regular expressions to avoid invalid escape sequence warnings on newer Python versions.

### Added
- `app.manifest`.
- Unit tests with pytest, and a smoke test that runs all lookups and macros on a Splunk instance.
8 changes: 3 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,14 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
boilerplate notice. The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Copyright 2022 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.PHONY: package test

package:
rm -rf dist/utbox
mkdir -p dist/utbox
rsync -a --exclude='__pycache__' --exclude='*.pyc' --exclude='/local' --exclude='/metadata/local.meta' package/ dist/utbox/
COPYFILE_DISABLE=1 tar -C dist -czf dist/utbox.tar.gz utbox

test:
python -m pytest tests
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# url_toolbox

URL Toolbox (UTBox) is a set of building blocks for Splunk that are specially created for URL manipulation. UTBox is modular, easy to use, and easy to deploy in any Splunk environment.

> [!NOTE]
> Discover more about this app in [this blog post](https://www.splunk.com/en_us/blog/security/ut-parsing-domains-like-house-slytherin.html) on Splunk Blogs.

## Getting Started

To install and run this app, download the latest compiled application directly from the releases page.
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3.6"

services:
splunk:
image: splunk/splunk:10.0.1
container_name: utbox_workbench
environment:
- SPLUNK_START_ARGS=--answer-yes --no-prompt --accept-license
- SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com
- SPLUNK_PASSWORD=passw0rd
ports:
- 8000:8000
- 8089:8089
volumes:
- './package:/opt/splunk/etc/apps/utbox'
Loading
Loading