Skip to content

Commit

Permalink
Added R7 Insight Support, still need test section to be updated
Browse files Browse the repository at this point in the history
  • Loading branch information
WOELLNER Christian committed Jun 19, 2024
1 parent 9893ebe commit 7d6b2e1
Show file tree
Hide file tree
Showing 62 changed files with 8,141 additions and 7,947 deletions.
20 changes: 10 additions & 10 deletions .env.wtfis.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Example ~/.env.wtfis file
# Don't forget to chmod 400!
VT_API_KEY=foo
PT_API_KEY=bar
[email protected]
IP2WHOIS_API_KEY=alice
SHODAN_API_KEY=hunter2
GREYNOISE_API_KEY=upupdowndown
ABUSEIPDB_API_KEY=bob
# WTFIS_DEFAULTS=-s -1 -n
# Example ~/.env.wtfis file
# Don't forget to chmod 400!
VT_API_KEY=foo
PT_API_KEY=bar
[email protected]
IP2WHOIS_API_KEY=alice
SHODAN_API_KEY=hunter2
GREYNOISE_API_KEY=upupdowndown
ABUSEIPDB_API_KEY=bob
# WTFIS_DEFAULTS=-s -1 -n
8 changes: 4 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 80
extend-select = B950
extend-ignore = E203,E501,E701
[flake8]
max-line-length = 80
extend-select = B950
extend-ignore = E203,E501,E701
144 changes: 72 additions & 72 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
name: build

on:
push:
tags:
- v*

jobs:
build:
name: Build wheels and source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Ensure latest pip
run: python -m pip install --upgrade pip

- name: Install hatch
run: pip install hatch

- name: Clean build
run: hatch clean

- name: Build sdist and wheels
run: hatch build

- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error

publish:
name: Publish release
needs:
- build
runs-on: ubuntu-latest
environment: production

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/[email protected]
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

release:
name: Create release
needs:
- publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Create release from tag
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
name: build

on:
push:
tags:
- v*

jobs:
build:
name: Build wheels and source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Ensure latest pip
run: python -m pip install --upgrade pip

- name: Install hatch
run: pip install hatch

- name: Clean build
run: hatch clean

- name: Build sdist and wheels
run: hatch build

- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error

publish:
name: Publish release
needs:
- build
runs-on: ubuntu-latest
environment: production

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/[email protected]
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

release:
name: Create release
needs:
- publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Create release from tag
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
132 changes: 66 additions & 66 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
name: tests

on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'imgs/**'
- 'LICENSE'
- '**/__about__.py'

pull_request:
branches:
- main
paths-ignore:
- '**.md'
- 'imgs/**'
- 'LICENSE'
- '**/__about__.py'

jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Ensure latest pip
run: python -m pip install --upgrade pip

- name: Install hatch
run: pip install hatch

- if: matrix.python-version == '3.9' && runner.os == 'Linux'
name: Lint
run: hatch run lint:all

- name: Run tests
run: hatch run test-all

semgrep:
name: Semgrep Scan
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep

# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')

steps:
- uses: actions/checkout@v3
- run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
name: tests

on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'imgs/**'
- 'LICENSE'
- '**/__about__.py'

pull_request:
branches:
- main
paths-ignore:
- '**.md'
- 'imgs/**'
- 'LICENSE'
- '**/__about__.py'

jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Ensure latest pip
run: python -m pip install --upgrade pip

- name: Install hatch
run: pip install hatch

- if: matrix.python-version == '3.9' && runner.os == 'Linux'
name: Lint
run: hatch run lint:all

- name: Run tests
run: hatch run test-all

semgrep:
name: Semgrep Scan
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep

# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')

steps:
- uses: actions/checkout@v3
- run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
Loading

0 comments on commit 7d6b2e1

Please sign in to comment.