Skip to content

Commit 401de97

Browse files
committed
Merge branch 'master' into update_Use_mutation_testing_to_find_the_bugs_your_tests_d_20250918_124237
2 parents 433ce99 + 773ac41 commit 401de97

File tree

64 files changed

+3744
-682
lines changed

Some content is hidden

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

64 files changed

+3744
-682
lines changed

.github/workflows/auto_merge_approved_prs.yml

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Auto Merge Approved PRs
22

33
on:
44
schedule:
5-
- cron: '0 */2 * * *' # Every 2 hours
5+
- cron: '0 */1 * * *' # Every 1 hour
66
workflow_dispatch: # Allow manual triggering
77

88
permissions:
@@ -26,9 +26,6 @@ jobs:
2626
git config --global user.email "[email protected]"
2727
git config --global user.name "GitHub Action"
2828
29-
- name: Make conflict resolution script executable
30-
run: chmod +x ./resolve_searchindex_conflicts.sh
31-
3229
- name: Check for running workflows
3330
id: check_workflows
3431
run: |
@@ -137,35 +134,8 @@ jobs:
137134
else
138135
echo "Failed to merge PR #$pr_number: $pr_title"
139136
fi
140-
elif [ "$pr_mergeable" = "CONFLICTED" ]; then
141-
echo "PR #$pr_number has conflicts. Attempting to resolve searchindex.js conflicts..."
142-
143-
# Try to resolve conflicts by updating the branch
144-
export GITHUB_REPOSITORY="$GITHUB_REPOSITORY"
145-
export GH_TOKEN="${{ secrets.PAT_TOKEN }}"
146-
if ./resolve_searchindex_conflicts.sh "$pr_number" "$head_branch" "$base_branch"; then
147-
echo "Successfully resolved searchindex.js conflicts for PR #$pr_number"
148-
149-
# Wait for GitHub to update the mergeable status after conflict resolution
150-
echo "Waiting for GitHub to process the conflict resolution..."
151-
sleep 15
152-
153-
# Check if it's now mergeable
154-
pr_mergeable_after=$(gh pr view "$pr_number" --json mergeable --jq '.mergeable' --repo "$GITHUB_REPOSITORY")
155-
if [ "$pr_mergeable_after" = "MERGEABLE" ]; then
156-
if gh pr merge "$pr_number" --merge --delete-branch --repo "$GITHUB_REPOSITORY"; then
157-
echo "Successfully merged PR #$pr_number after resolving conflicts: $pr_title"
158-
current_count=$(cat /tmp/merged_count)
159-
echo $((current_count + 1)) > /tmp/merged_count
160-
else
161-
echo "Failed to merge PR #$pr_number after conflict resolution: $pr_title"
162-
fi
163-
else
164-
echo "PR #$pr_number still not mergeable after conflict resolution (status: $pr_mergeable_after)"
165-
fi
166-
else
167-
echo "Failed to resolve conflicts for PR #$pr_number"
168-
fi
137+
elif [ "$pr_mergeable" = "CONFLICTED" ] || [ "$pr_mergeable" = "CONFLICTING" ]; then
138+
echo "PR #$pr_number has conflicts. Skipping auto-merge so it can be resolved manually."
169139
else
170140
echo "PR #$pr_number is not mergeable (status: $pr_mergeable)"
171141
fi

.github/workflows/build_master.yml

Lines changed: 23 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -35,60 +35,38 @@ jobs:
3535
- name: Build mdBook
3636
run: MDBOOK_BOOK__LANGUAGE=en mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1)
3737

38-
- name: Update searchindex in repo (purge history, keep current on HEAD)
38+
- name: Install GitHub CLI
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y gh
42+
43+
- name: Publish search index release asset
3944
shell: bash
45+
env:
46+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
4047
run: |
4148
set -euo pipefail
4249
43-
ls -la
44-
ls -la book
45-
46-
git config --global --add safe.directory /__w/hacktricks/hacktricks
47-
git config --global user.email "[email protected]"
48-
git config --global user.name "Build master"
49-
git config pull.rebase false
50-
51-
# Ensure we're on the target branch and up to date
52-
git fetch origin
53-
git reset --hard origin/master
50+
ASSET="book/searchindex.js"
51+
TAG="searchindex-en"
52+
TITLE="Search Index (en)"
5453
55-
# Choose the file to keep at HEAD:
56-
# 1) Prefer freshly built version from book/
57-
# 2) Fallback to the file currently at HEAD (if it exists)
58-
HAS_FILE=0
59-
if [ -f "book/searchindex.js" ]; then
60-
cp "book/searchindex.js" /tmp/sidx.js
61-
HAS_FILE=1
62-
elif git cat-file -e "HEAD:searchindex.js" 2>/dev/null; then
63-
git show "HEAD:searchindex.js" > /tmp/sidx.js
64-
HAS_FILE=1
54+
if [ ! -f "$ASSET" ]; then
55+
echo "Expected $ASSET to exist after build" >&2
56+
exit 1
6557
fi
6658
67-
# Skip if there's nothing to purge AND nothing to keep
68-
if [ "$HAS_FILE" = "1" ] || git rev-list -n 1 HEAD -- "searchindex.js" >/dev/null 2>&1; then
69-
# Fail early if working tree is dirty (avoid confusing rewrites)
70-
git diff --quiet || { echo "Working tree has uncommitted changes; aborting purge." >&2; exit 1; }
71-
72-
# Install git-filter-repo and ensure it's on PATH
73-
python -m pip install --quiet --user git-filter-repo
74-
export PATH="$HOME/.local/bin:$PATH"
75-
76-
# Rewrite ONLY the current branch, dropping all historical blobs of searchindex.js
77-
git filter-repo --force --path "searchindex.js" --invert-paths --refs "$(git symbolic-ref -q HEAD)"
78-
79-
# Re-add the current version on top of rewritten history (keep it in HEAD)
80-
if [ "$HAS_FILE" = "1" ]; then
81-
mv /tmp/sidx.js "searchindex.js"
82-
git add "searchindex.js"
83-
git commit -m "Update searchindex (purged history; keep current)"
84-
else
85-
echo "No current searchindex.js to re-add after purge."
86-
fi
59+
TOKEN="${PAT_TOKEN:-${GITHUB_TOKEN:-}}"
60+
if [ -z "$TOKEN" ]; then
61+
echo "No token available for GitHub CLI" >&2
62+
exit 1
63+
fi
64+
export GH_TOKEN="$TOKEN"
8765
88-
# Safer force push (only updates if remote hasn't advanced)
89-
git push --force-with-lease
66+
if ! gh release view "$TAG" >/dev/null 2>&1; then
67+
gh release create "$TAG" "$ASSET" --title "$TITLE" --notes "Automated search index build for master" --repo "$GITHUB_REPOSITORY"
9068
else
91-
echo "Nothing to purge; skipping."
69+
gh release upload "$TAG" "$ASSET" --clobber --repo "$GITHUB_REPOSITORY"
9270
fi
9371
9472

.github/workflows/translate_all.yml

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- name: Update and download scripts
6666
run: |
6767
sudo apt-get update
68-
sudo apt-get install wget -y
68+
sudo apt-get install -y wget gh
6969
mkdir scripts
7070
cd scripts
7171
wget -O get_and_save_refs.py https://raw.githubusercontent.com/HackTricks-wiki/hacktricks-cloud/master/scripts/get_and_save_refs.py
@@ -123,57 +123,35 @@ jobs:
123123
git pull
124124
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1)
125125
126-
- name: Update searchindex.js in repo (purge history, keep current on HEAD)
126+
- name: Publish search index release asset
127127
shell: bash
128+
env:
129+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
128130
run: |
129131
set -euo pipefail
130132
131-
# Be explicit about workspace trust (avoids "dubious ownership")
132-
git config --global --add safe.directory "$GITHUB_WORKSPACE"
133+
ASSET="book/searchindex.js"
134+
TAG="searchindex-${BRANCH}"
135+
TITLE="Search Index (${BRANCH})"
133136
134-
git checkout "$BRANCH"
135-
git fetch origin "$BRANCH" --quiet
136-
git pull --ff-only
137-
138-
# Choose the file to keep at HEAD:
139-
# 1) Prefer freshly built version from book/
140-
# 2) Fallback to the file currently at HEAD (if it exists)
141-
HAS_FILE=0
142-
if [ -f "book/searchindex.js" ]; then
143-
cp "book/searchindex.js" /tmp/sidx.js
144-
HAS_FILE=1
145-
elif git cat-file -e "HEAD:searchindex.js" 2>/dev/null; then
146-
git show "HEAD:searchindex.js" > /tmp/sidx.js
147-
HAS_FILE=1
137+
if [ ! -f "$ASSET" ]; then
138+
echo "Expected $ASSET to exist after build" >&2
139+
exit 1
148140
fi
149141
150-
# Skip if there's nothing to purge AND nothing to keep
151-
if [ "$HAS_FILE" = "1" ] || git rev-list -n 1 "$BRANCH" -- "searchindex.js" >/dev/null 2>&1; then
152-
# **Fail early if working tree is dirty** (prevents confusing filter results)
153-
git diff --quiet || { echo "Working tree has uncommitted changes; aborting purge." >&2; exit 1; }
154-
155-
# Make sure git-filter-repo is callable via `git filter-repo`
156-
python -m pip install --quiet --user git-filter-repo
157-
export PATH="$HOME/.local/bin:$PATH"
158-
159-
# Rewrite ONLY this branch, dropping all historical blobs of searchindex.js
160-
git filter-repo --force --path "searchindex.js" --invert-paths --refs "refs/heads/$BRANCH"
161-
162-
# Re-add the current version on top of rewritten history (keep it in HEAD)
163-
if [ "$HAS_FILE" = "1" ]; then
164-
mv /tmp/sidx.js "searchindex.js"
165-
git add "searchindex.js"
166-
git commit -m "Update searchindex (purged history; keep current)"
167-
else
168-
echo "No current searchindex.js to re-add after purge."
169-
fi
142+
TOKEN="${PAT_TOKEN:-${GITHUB_TOKEN:-}}"
143+
if [ -z "$TOKEN" ]; then
144+
echo "No token available for GitHub CLI" >&2
145+
exit 1
146+
fi
147+
export GH_TOKEN="$TOKEN"
170148
171-
# **Safer force push** (prevents clobbering unexpected remote updates)
172-
git push --force-with-lease origin "$BRANCH"
149+
if ! gh release view "$TAG" >/dev/null 2>&1; then
150+
gh release create "$TAG" "$ASSET" --title "$TITLE" --notes "Automated search index build for $BRANCH" --repo "$GITHUB_REPOSITORY"
173151
else
174-
echo "Nothing to purge; skipping."
152+
gh release upload "$TAG" "$ASSET" --clobber --repo "$GITHUB_REPOSITORY"
175153
fi
176-
154+
177155
# Login in AWs
178156
- name: Configure AWS credentials using OIDC
179157
uses: aws-actions/configure-aws-credentials@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ book
1111
book/*
1212
hacktricks-preprocessor.log
1313
hacktricks-preprocessor-error.log
14+
searchindex.js

src/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,21 @@ Stay informed and up to date with the latest in cybersecurity by visiting our [*
222222
https://www.lasttowersolutions.com/
223223
{{#endref}}
224224

225+
---
226+
227+
### [K8Studio - The Smarter GUI to Manage Kubernetes.](https://k8studio.io/)
228+
229+
<figure><img src="images/k8studio.png" alt="k8studio logo"><figcaption></figcaption></figure>
230+
231+
K8Studio IDE empowers DevOps, DevSecOps, and developers to manage, monitor, and secure Kubernetes clusters efficiently. Leverage our AI-driven insights, advanced security framework, and intuitive CloudMaps GUI to visualize your clusters, understand their state, and act with confidence.
232+
233+
Moreover, K8Studio is **compatible with all major kubernetes distributions** (AWS, GCP, Azure, DO, Rancher, K3s, Openshift and more).
234+
235+
{{#ref}}
236+
https://k8studio.io/
237+
{{#endref}}
238+
239+
225240
---
226241

227242
## License & Disclaimer

0 commit comments

Comments
 (0)