Skip to content

Commit ad4ca98

Browse files
Merge pull request #2760 from blacklanternsecurity/dev
Dev -> Stable 2.8.0
2 parents a0094bd + 5670238 commit ad4ca98

94 files changed

Lines changed: 2711 additions & 1567 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@v6
2424
with:
2525
fetch-depth: 0 # Need full history for branch comparison
2626

@@ -51,7 +51,7 @@ jobs:
5151

5252
# Upload benchmark results as artifacts
5353
- name: Upload benchmark results
54-
uses: actions/upload-artifact@v4
54+
uses: actions/upload-artifact@v6
5555
with:
5656
name: benchmark-results
5757
path: |

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@v5
58+
uses: actions/checkout@v6
5959

6060
# Add any setup steps before running the `github/codeql-action/init` action.
6161
# This includes steps like installing compilers or runtimes (`actions/setup-node`

.github/workflows/distro_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: ["ubuntu:22.04", "ubuntu:24.04", "debian", "archlinux", "fedora", "kalilinux/kali-rolling", "parrotsec/security"]
1818
steps:
19-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
2020
- name: Install Python and Poetry
2121
run: |
2222
if [ -f /etc/os-release ]; then
@@ -66,7 +66,7 @@ jobs:
6666
poetry run pytest --reruns 2 --exitfirst -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=INFO .
6767
- name: Upload Debug Logs
6868
if: always()
69-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@v6
7070
with:
7171
name: pytest-debug-logs-${{ env.OS_NAME }}
7272
path: pytest_debug.log

.github/workflows/docs_updater.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
update_docs:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v6
1313
with:
1414
token: ${{ secrets.BBOT_DOCS_UPDATER_PAT }}
1515
ref: dev # Checkout the dev branch
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
poetry run bbot/scripts/docs.py
2727
- name: Create or Update Pull Request
28-
uses: peter-evans/create-pull-request@v7
28+
uses: peter-evans/create-pull-request@v8
2929
with:
3030
token: ${{ secrets.BBOT_DOCS_UPDATER_PAT }}
3131
branch: update-docs

.github/workflows/tests.yml

Lines changed: 91 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2121
steps:
22-
- uses: actions/checkout@v5
22+
- uses: actions/checkout@v6
2323
- name: Set up Python
2424
uses: actions/setup-python@v6
2525
with:
@@ -39,7 +39,7 @@ jobs:
3939
poetry run pytest -vv --reruns 2 -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=INFO --cov-config=bbot/test/coverage.cfg --cov-report xml:cov.xml --cov=bbot .
4040
- name: Upload Debug Logs
4141
if: always()
42-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@v6
4343
with:
4444
name: pytest-debug-logs-${{ env.PYTHON_VERSION }}
4545
path: pytest_debug.log
@@ -55,9 +55,16 @@ jobs:
5555
if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/stable')
5656
continue-on-error: true
5757
steps:
58-
- uses: actions/checkout@v5
58+
- uses: actions/checkout@v6
5959
with:
6060
fetch-depth: 0
61+
- name: Set up Docker Buildx
62+
uses: docker/setup-buildx-action@v3
63+
- name: Login to Docker Hub
64+
uses: docker/login-action@v3
65+
with:
66+
username: ${{ secrets.DOCKER_USERNAME }}
67+
password: ${{ secrets.DOCKER_PASSWORD }}
6168
- name: Set up Python
6269
uses: actions/setup-python@v6
6370
with:
@@ -77,44 +84,111 @@ jobs:
7784
password: ${{ secrets.PYPI_API_TOKEN }}
7885
- name: Get BBOT version
7986
id: version
80-
run: echo "BBOT_VERSION=$(poetry version | cut -d' ' -f2)" >> $GITHUB_OUTPUT
87+
run: |
88+
FULL_VERSION=$(poetry version | cut -d' ' -f2)
89+
echo "BBOT_VERSION=$FULL_VERSION" >> $GITHUB_OUTPUT
90+
# Extract major.minor (e.g., 2.7 from 2.7.1)
91+
MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d'.' -f1-2)
92+
echo "BBOT_VERSION_MAJOR_MINOR=$MAJOR_MINOR" >> $GITHUB_OUTPUT
93+
# Extract major (e.g., 2 from 2.7.1)
94+
MAJOR=$(echo "$FULL_VERSION" | cut -d'.' -f1)
95+
echo "BBOT_VERSION_MAJOR=$MAJOR" >> $GITHUB_OUTPUT
8196
- name: Publish to Docker Hub (dev)
8297
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
83-
uses: elgohr/Publish-Docker-Github-Action@v5
98+
uses: docker/build-push-action@v6
8499
with:
85-
name: blacklanternsecurity/bbot
86-
username: ${{ secrets.DOCKER_USERNAME }}
87-
password: ${{ secrets.DOCKER_PASSWORD }}
88-
tags: "latest,dev,${{ steps.version.outputs.BBOT_VERSION }}"
100+
push: true
101+
context: .
102+
tags: |
103+
blacklanternsecurity/bbot:latest
104+
blacklanternsecurity/bbot:dev
105+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}
106+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}
107+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}
89108
- name: Publish to Docker Hub (stable)
90109
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
91-
uses: elgohr/Publish-Docker-Github-Action@v5
110+
uses: docker/build-push-action@v6
92111
with:
93-
name: blacklanternsecurity/bbot
94-
username: ${{ secrets.DOCKER_USERNAME }}
95-
password: ${{ secrets.DOCKER_PASSWORD }}
96-
tags: "stable,${{ steps.version.outputs.BBOT_VERSION }}"
112+
push: true
113+
context: .
114+
tags: |
115+
blacklanternsecurity/bbot:stable
116+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}
117+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}
118+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}
119+
- name: Publish Full Docker Image to Docker Hub (dev)
120+
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
121+
uses: docker/build-push-action@v6
122+
with:
123+
push: true
124+
file: Dockerfile.full
125+
context: .
126+
tags: |
127+
blacklanternsecurity/bbot:latest-full
128+
blacklanternsecurity/bbot:dev-full
129+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}-full
130+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}-full
131+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}-full
132+
- name: Publish Full Docker Image to Docker Hub (stable)
133+
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
134+
uses: docker/build-push-action@v6
135+
with:
136+
push: true
137+
file: Dockerfile.full
138+
context: .
139+
tags: |
140+
blacklanternsecurity/bbot:stable-full
141+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}-full
142+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}-full
143+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}-full
97144
- name: Docker Hub Description
98145
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
99146
uses: peter-evans/dockerhub-description@v5
100147
with:
101148
username: ${{ secrets.DOCKER_USERNAME }}
102149
password: ${{ secrets.DOCKER_PASSWORD }}
103150
repository: blacklanternsecurity/bbot
151+
- name: Clean up old Docker Hub tags (up to 50 most recent tags plus 'latest')
152+
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
153+
run: |
154+
# Install jq for JSON processing
155+
sudo apt-get update && sudo apt-get install -y jq
156+
157+
IMAGE="blacklanternsecurity/bbot"
158+
159+
# Clean up dev tags (keep 50 most recent)
160+
for tag_pattern in "rc$" "rc-full$"; do
161+
echo "Cleaning up tags ending with $tag_pattern..."
162+
163+
tags_response=$(curl -s -H "Authorization: Bearer ${{ secrets.DOCKER_TOKEN }}" \
164+
"https://hub.docker.com/v2/repositories/$IMAGE/tags/?page_size=100")
165+
166+
tags_to_delete=$(echo "$tags_response" | jq -r --arg pattern "$tag_pattern" \
167+
'.results[] | select(.name | test($pattern)) | [.last_updated, .name] | @tsv' | \
168+
sort -r | tail -n +51 | cut -f2)
169+
170+
for tag in $tags_to_delete; do
171+
echo "Deleting $IMAGE tag: $tag"
172+
curl -X DELETE -H "Authorization: Bearer ${{ secrets.DOCKER_TOKEN }}" \
173+
"https://hub.docker.com/v2/repositories/$IMAGE/tags/$tag/"
174+
done
175+
176+
echo "Cleanup completed for tags ending with $tag_pattern. Kept 50 most recent."
177+
done
104178
outputs:
105179
BBOT_VERSION: ${{ steps.version.outputs.BBOT_VERSION }}
106180
publish_docs:
107181
runs-on: ubuntu-latest
108182
if: github.event_name == 'push' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/dev')
109183
steps:
110-
- uses: actions/checkout@v5
184+
- uses: actions/checkout@v6
111185
with:
112186
token: ${{ secrets.BBOT_DOCS_UPDATER_PAT }}
113187
- uses: actions/setup-python@v6
114188
with:
115189
python-version: "3.11"
116190
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
117-
- uses: actions/cache@v4
191+
- uses: actions/cache@v5
118192
with:
119193
key: mkdocs-material-${{ env.cache_id }}
120194
path: .cache
@@ -151,7 +225,7 @@ jobs:
151225
# runs-on: ubuntu-latest
152226
# if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
153227
# steps:
154-
# - uses: actions/checkout@v5
228+
# - uses: actions/checkout@v6
155229
# with:
156230
# ref: ${{ github.head_ref }}
157231
# fetch-depth: 0 # Fetch all history for all tags and branches

.github/workflows/version_updater.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
update-nuclei-version:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v6
1313
with:
1414
ref: dev
1515
fetch-depth: 0
@@ -44,7 +44,7 @@ jobs:
4444
run: "sed -i '0,/\"version\": \".*\",/ s/\"version\": \".*\",/\"version\": \"${{ env.latest_version }}\",/g' bbot/modules/nuclei.py"
4545
- name: Create pull request to update the version
4646
if: steps.update-version.outcome == 'success'
47-
uses: peter-evans/create-pull-request@v7
47+
uses: peter-evans/create-pull-request@v8
4848
with:
4949
token: ${{ secrets.BBOT_DOCS_UPDATER_PAT }}
5050
commit-message: "Update nuclei"
@@ -61,7 +61,7 @@ jobs:
6161
update-trufflehog-version:
6262
runs-on: ubuntu-latest
6363
steps:
64-
- uses: actions/checkout@v5
64+
- uses: actions/checkout@v6
6565
with:
6666
ref: dev
6767
fetch-depth: 0
@@ -96,7 +96,7 @@ jobs:
9696
run: "sed -i '0,/\"version\": \".*\",/ s/\"version\": \".*\",/\"version\": \"${{ env.latest_version }}\",/g' bbot/modules/trufflehog.py"
9797
- name: Create pull request to update the version
9898
if: steps.update-version.outcome == 'success'
99-
uses: peter-evans/create-pull-request@v7
99+
uses: peter-evans/create-pull-request@v8
100100
with:
101101
token: ${{ secrets.BBOT_DOCS_UPDATER_PAT }}
102102
commit-message: "Update trufflehog"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.10-slim
1+
FROM python:3.11-slim
22

33
ENV LANG=C.UTF-8
44
ENV LC_ALL=C.UTF-8

Dockerfile.full

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM python:3.11-slim
2+
3+
ENV LANG=C.UTF-8
4+
ENV LC_ALL=C.UTF-8
5+
ENV PIP_NO_CACHE_DIR=off
6+
7+
WORKDIR /usr/src/bbot
8+
9+
RUN apt-get update && apt-get install -y openssl gcc git make unzip curl wget vim nano sudo
10+
11+
COPY . .
12+
13+
RUN pip install .
14+
15+
RUN bbot --install-all-deps
16+
17+
WORKDIR /root
18+
19+
ENTRYPOINT [ "bbot" ]

0 commit comments

Comments
 (0)