Repository navigation
chore: import URL Toolbox from splunk/utbox (1.9.5) #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
4e8aa97
First commit
iforrest 1db1553
Initial commit
iforrest 1428fa8
Merge branch 'master' of github.com:iforrest/utbox
iforrest eb4b7a1
add splunk test matrix
dfederschmidt 64a6509
add demo command
dfederschmidt e972d8b
escaping
dfederschmidt 331f390
add python.version key to transforms
dfederschmidt 98d31f8
add appinspect api test
dfederschmidt 60659e5
add appinspect api test
dfederschmidt bb17061
add appinspect api test
dfederschmidt 8ff9c3e
set to current splunkbase version
dfederschmidt 3c41dbc
test python3 transforms
dfederschmidt e5156ba
add makefile
dfederschmidt 630a566
initial take
dfederschmidt 22951ff
some examples
dfederschmidt 7174468
some development notes
dfederschmidt e316590
Create LICENSE
mayurah 6eb0324
fix mozilla list loading and add unittest
dfederschmidt 174bbff
remove matrix + add env var
dfederschmidt dd5577a
create logfile
dfederschmidt 7bc60fd
add error handling for case where there is no url field
dfederschmidt 4439a83
remove unused imports
dfederschmidt 37d5d15
add fallback if logger instantiation fails
dfederschmidt 4cd887b
Merge pull request #2 from splunk/fix_mozilla
dfederschmidt 9cacbd6
bump version
dfederschmidt c156de5
Update README.md
mayurah 5f43f40
add docker compose and how to run test
dfederschmidt e2330a0
small addition
dfederschmidt 8947c9f
added log max size & backup count
dw-seanelliott b4efca4
bump version
dw-seanelliott 296953d
Merge pull request #9 from satellite-no/log-rotate-bug
ggokdemir 7bb717d
Update README.md
ggokdemir 553f7ab
Merge pull request #10 from splunk/github_actions_update
ggokdemir 9092069
Create static
ggokdemir 406a976
Delete utbox/static
ggokdemir 143b467
Add icons
ggokdemir 52e6a97
Add appIcons
ggokdemir 1b43098
Delete utbox/static/icons
ggokdemir f8db838
Merge pull request #11 from splunk/icon_update
ggokdemir 441175c
Add Splunk version 9.3
ggokdemir a729d95
CI: run unit tests on Python 3.13
ricardom-splunk 509d864
Merge pull request #17 from splunk/fdse-3595-fix-ci
ricardom-splunk af73fb9
chore: merge utbox history from splunk/utbox
ricardom-splunk 9f564ea
docs: add URL Toolbox content to README and docs
ricardom-splunk eca0e50
ci: adopt the org layout and pipelines
ricardom-splunk 42d5eee
fix: declare Python 3.13 requirement on all external lookups (1.9.5)
ricardom-splunk 8ea4208
style: lint and format the Python code with the org ruff config
ricardom-splunk 6a130d7
test: use pytest and the org tests layout
ricardom-splunk 878e817
build: add app.manifest as in the org repository structure
ricardom-splunk 2165978
docs: replace the PDF product guide with markdown and add the 1.9.5 c…
ricardom-splunk 4a5f8a6
chore: remove the navigation file, the app has no user interface
ricardom-splunk 840065f
ci: run tests only on pull requests that touch the package or the tests
ricardom-splunk 579d2a2
docs: address review feedback on the README, docs and changelog
ricardom-splunk 90aa08e
ci: keep polling while Splunk restarts instead of failing on the firs…
ricardom-splunk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,3 +78,6 @@ build/ | |
| # Pre-commit | ||
| .ruff-cache | ||
| .python-version | ||
|
|
||
| # Local packaging output (make package) | ||
| dist/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.