mirror of
https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
synced 2026-02-14 08:36:38 +00:00
Compare commits
10 Commits
20260212-4
...
test/chack
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d79e9c46b | ||
|
|
99111a2844 | ||
|
|
231dc93ebe | ||
|
|
f7f4695b5d | ||
|
|
a0d3cf3372 | ||
|
|
c10f03955d | ||
|
|
c3a942fdba | ||
|
|
db0adb7e33 | ||
|
|
7ca05693ef | ||
|
|
0ec20d2512 |
3
.github/workflows/PR-tests.yml
vendored
3
.github/workflows/PR-tests.yml
vendored
@@ -161,9 +161,11 @@ jobs:
|
||||
run: linPEAS/linpeas_fat.sh -o software_information -a
|
||||
|
||||
- name: Run linpeas interesting_perms_files
|
||||
if: ${{ false }}
|
||||
run: linPEAS/linpeas_fat.sh -o interesting_perms_files -a
|
||||
|
||||
- name: Run linpeas interesting_files
|
||||
if: ${{ false }}
|
||||
run: linPEAS/linpeas_fat.sh -o interesting_files -a
|
||||
|
||||
Build_and_test_macpeas_pr:
|
||||
@@ -207,4 +209,5 @@ jobs:
|
||||
run: linPEAS/linpeas_fat.sh -o users_information -a
|
||||
|
||||
- name: Run macpeas software_information
|
||||
if: ${{ false }}
|
||||
run: linPEAS/linpeas_fat.sh -o software_information -a
|
||||
|
||||
31
.github/workflows/chack-agent-pr-triage.yml
vendored
31
.github/workflows/chack-agent-pr-triage.yml
vendored
@@ -7,8 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
chack_agent_triage:
|
||||
# Temporarily disabled by maintainer request.
|
||||
if: ${{ false && github.event.workflow_run.conclusion == 'success' }}
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -31,10 +30,15 @@ jobs:
|
||||
- name: Resolve PR context
|
||||
id: gate
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
pr_number="${{ github.event.workflow_run.pull_requests[0].number }}"
|
||||
pr_number="${PR_NUMBER}"
|
||||
if [ -z "$pr_number" ] && [ -n "$HEAD_BRANCH" ]; then
|
||||
pr_number="$(gh pr list --state open --head "$HEAD_BRANCH" --json number --jq '.[0].number')"
|
||||
fi
|
||||
if [ -z "$pr_number" ]; then
|
||||
echo "No pull request found for this workflow_run; skipping."
|
||||
echo "should_run=false" >> "$GITHUB_OUTPUT"
|
||||
@@ -83,12 +87,24 @@ jobs:
|
||||
${{ steps.gate.outputs.base_ref }} \
|
||||
+refs/pull/${{ steps.gate.outputs.pr_number }}/head
|
||||
|
||||
- name: Set up Node.js for Codex
|
||||
if: ${{ steps.gate.outputs.should_run == 'true' }}
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Codex CLI
|
||||
if: ${{ steps.gate.outputs.should_run == 'true' }}
|
||||
run: |
|
||||
npm install -g @openai/codex
|
||||
codex --version
|
||||
|
||||
- name: Run Chack Agent
|
||||
id: run_chack
|
||||
if: ${{ steps.gate.outputs.should_run == 'true' }}
|
||||
uses: carlospolop/chack-agent@master
|
||||
with:
|
||||
provider: openrouter
|
||||
provider: codex
|
||||
model_primary: CHEAP_BUT_QUALITY
|
||||
main_action: peass-ng
|
||||
sub_action: Chack-Agent PR Triage
|
||||
@@ -99,7 +115,7 @@ jobs:
|
||||
Remember taht you are an autonomouts agent, use the exec tool to run the needed commands to list, read, analyze, modify, test...
|
||||
tools_config_json: "{\"exec_enabled\": true}"
|
||||
session_config_json: "{\"long_term_memory_enabled\": false}"
|
||||
agent_config_json: "{\"self_critique_enabled\": false, \"require_task_list_init_first\": true}"
|
||||
agent_config_json: "{\"self_critique_enabled\": false, \"require_task_steps_manager_init_first\": true}"
|
||||
output_schema_file: .github/chack-agent/pr-merge-schema.json
|
||||
user_prompt: |
|
||||
You are reviewing PR #${{ steps.gate.outputs.pr_number }} for ${{ github.repository }}.
|
||||
@@ -123,7 +139,7 @@ jobs:
|
||||
|
||||
Output JSON only, following the provided schema:
|
||||
.github/chack-agent/pr-merge-schema.json
|
||||
openrouter_api_key: ${{ secrets.OPENROUTER_API_KEY }}
|
||||
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
- name: Parse Chack Agent decision
|
||||
id: parse
|
||||
@@ -157,8 +173,7 @@ jobs:
|
||||
merge_or_comment:
|
||||
runs-on: ubuntu-latest
|
||||
needs: chack_agent_triage
|
||||
# Temporarily disabled by maintainer request.
|
||||
if: ${{ false && github.event.workflow_run.conclusion == 'success' && needs.chack_agent_triage.outputs.should_run == 'true' && needs.chack_agent_triage.outputs.decision != '' }}
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' && needs.chack_agent_triage.outputs.should_run == 'true' && needs.chack_agent_triage.outputs.decision != '' }}
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
@@ -7,9 +7,8 @@ on:
|
||||
|
||||
jobs:
|
||||
chack_agent_fix_master_failure:
|
||||
# Temporarily disabled by maintainer request.
|
||||
if: >
|
||||
${{ false && github.event.workflow_run.conclusion == 'failure' &&
|
||||
${{ github.event.workflow_run.conclusion == 'failure' &&
|
||||
github.event.workflow_run.head_branch == 'master' &&
|
||||
!startsWith(github.event.workflow_run.head_commit.message, 'Fix CI-master failures for run #') }}
|
||||
runs-on: ubuntu-latest
|
||||
@@ -98,11 +97,21 @@ jobs:
|
||||
echo "Leave the repo in a state ready to commit; changes will be committed and pushed automatically."
|
||||
} > chack_prompt.txt
|
||||
|
||||
- name: Set up Node.js for Codex
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Codex CLI
|
||||
run: |
|
||||
npm install -g @openai/codex
|
||||
codex --version
|
||||
|
||||
- name: Run Chack Agent
|
||||
id: run_chack
|
||||
uses: carlospolop/chack-agent@master
|
||||
with:
|
||||
provider: openrouter
|
||||
provider: codex
|
||||
model_primary: CHEAP_BUT_QUALITY
|
||||
main_action: peass-ng
|
||||
sub_action: CI-master Failure Chack-Agent PR
|
||||
@@ -112,8 +121,8 @@ jobs:
|
||||
prompt_file: chack_prompt.txt
|
||||
tools_config_json: "{\"exec_enabled\": true}"
|
||||
session_config_json: "{\"long_term_memory_enabled\": false}"
|
||||
agent_config_json: "{\"self_critique_enabled\": false, \"require_task_list_init_first\": true}"
|
||||
openrouter_api_key: ${{ secrets.OPENROUTER_API_KEY }}
|
||||
agent_config_json: "{\"self_critique_enabled\": false, \"require_task_steps_manager_init_first\": true}"
|
||||
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
- name: Commit and push fix branch if changed
|
||||
id: push_fix
|
||||
|
||||
@@ -7,12 +7,9 @@ on:
|
||||
|
||||
jobs:
|
||||
resolve_pr_context:
|
||||
# Temporarily disabled by maintainer request.
|
||||
if: >
|
||||
${{ false && github.event.workflow_run.conclusion == 'failure' &&
|
||||
github.event.workflow_run.pull_requests &&
|
||||
github.event.workflow_run.pull_requests[0] &&
|
||||
!startsWith(github.event.workflow_run.head_commit.message, 'Fix CI failures for PR #') }}
|
||||
${{ github.event.workflow_run.conclusion == 'failure' &&
|
||||
!startsWith(github.event.workflow_run.head_commit.message || '', 'Fix CI failures for PR #') }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: read
|
||||
@@ -28,8 +25,23 @@ jobs:
|
||||
id: pr_context
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if [ -z "$PR_NUMBER" ] && [ -n "$HEAD_BRANCH" ]; then
|
||||
PR_NUMBER="$(gh pr list --state open --head "$HEAD_BRANCH" --json number --jq '.[0].number')"
|
||||
fi
|
||||
if [ -z "$PR_NUMBER" ]; then
|
||||
echo "No pull request found for workflow_run; skipping."
|
||||
{
|
||||
echo "number="
|
||||
echo "author="
|
||||
echo "head_repo="
|
||||
echo "head_branch=${HEAD_BRANCH}"
|
||||
echo "should_run=false"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
pr_author=$(gh api -H "Accept: application/vnd.github+json" \
|
||||
/repos/${{ github.repository }}/pulls/${PR_NUMBER} \
|
||||
--jq '.user.login')
|
||||
@@ -58,14 +70,13 @@ jobs:
|
||||
|
||||
chack_agent_on_failure:
|
||||
needs: resolve_pr_context
|
||||
# Temporarily disabled by maintainer request.
|
||||
if: ${{ false && needs.resolve_pr_context.outputs.author == 'carlospolop' && needs.resolve_pr_context.outputs.should_run == 'true' }}
|
||||
if: ${{ needs.resolve_pr_context.outputs.author == 'carlospolop' && needs.resolve_pr_context.outputs.should_run == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
actions: read
|
||||
actions: write
|
||||
env:
|
||||
CHACK_LOGS_HTTP_URL: ${{ secrets.CHACK_LOGS_HTTP_URL }}
|
||||
steps:
|
||||
@@ -156,11 +167,21 @@ jobs:
|
||||
echo "Leave the repo in a state ready to commit as when you finish, it'll be automatically committed and pushed."
|
||||
} > chack_prompt.txt
|
||||
|
||||
- name: Set up Node.js for Codex
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Codex CLI
|
||||
run: |
|
||||
npm install -g @openai/codex
|
||||
codex --version
|
||||
|
||||
- name: Run Chack Agent
|
||||
id: run_chack
|
||||
uses: carlospolop/chack-agent@master
|
||||
with:
|
||||
provider: openrouter
|
||||
provider: codex
|
||||
model_primary: CHEAP_BUT_QUALITY
|
||||
main_action: peass-ng
|
||||
sub_action: PR Failure Chack-Agent Dispatch
|
||||
@@ -171,13 +192,14 @@ jobs:
|
||||
prompt_file: chack_prompt.txt
|
||||
tools_config_json: "{\"exec_enabled\": true}"
|
||||
session_config_json: "{\"long_term_memory_enabled\": false}"
|
||||
agent_config_json: "{\"self_critique_enabled\": false, \"require_task_list_init_first\": true}"
|
||||
openrouter_api_key: ${{ secrets.OPENROUTER_API_KEY }}
|
||||
agent_config_json: "{\"self_critique_enabled\": false, \"require_task_steps_manager_init_first\": true}"
|
||||
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
- name: Commit and push if changed
|
||||
env:
|
||||
TARGET_BRANCH: ${{ needs.resolve_pr_context.outputs.head_branch }}
|
||||
PR_NUMBER: ${{ needs.resolve_pr_context.outputs.number }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if git diff --quiet; then
|
||||
echo "No changes to commit."
|
||||
@@ -203,6 +225,7 @@ jobs:
|
||||
echo "Push failed (likely token workflow permission limits); leaving run successful without push."
|
||||
exit 0
|
||||
fi
|
||||
gh workflow run PR-tests.yml --ref "${TARGET_BRANCH}"
|
||||
|
||||
- name: Comment with Chack Agent result
|
||||
if: ${{ steps.run_chack.outputs.final-message != '' }}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -51,5 +51,5 @@ if __name__ == "__main__":
|
||||
print("You must specify one of the following options: --all, --all-no-fat, --small or --include")
|
||||
parser.print_help()
|
||||
exit(1)
|
||||
|
||||
|
||||
main(all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules, output)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Title: Users Information - subuid/subgid mappings
|
||||
# ID: UG_Subuid_subgid_mappings
|
||||
# Author: Carlos Polop
|
||||
# Last Update: 13-02-2026
|
||||
# Description: Show delegated user namespace ID ranges from /etc/subuid and /etc/subgid.
|
||||
# License: GNU GPL
|
||||
# Version: 1.0
|
||||
# Functions Used: print_2title
|
||||
# Global Variables: $MACPEAS
|
||||
# Initial Functions:
|
||||
# Generated Global Variables:
|
||||
# Fat linpeas: 0
|
||||
# Small linpeas: 1
|
||||
|
||||
|
||||
print_2title "User namespace mappings (subuid/subgid)"
|
||||
if [ "$MACPEAS" ]; then
|
||||
echo "Not applicable on macOS"
|
||||
else
|
||||
if [ -r /etc/subuid ]; then
|
||||
echo "subuid:"
|
||||
grep -v -E '^\s*#|^\s*$' /etc/subuid 2>/dev/null
|
||||
else
|
||||
echo "/etc/subuid not readable or not present"
|
||||
fi
|
||||
|
||||
if [ -r /etc/subgid ]; then
|
||||
echo ""
|
||||
echo "subgid:"
|
||||
grep -v -E '^\s*#|^\s*$' /etc/subgid 2>/dev/null
|
||||
else
|
||||
echo "/etc/subgid not readable or not present"
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
9558
linPEAS/linpeas_fat.sh
Normal file
9558
linPEAS/linpeas_fat.sh
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user