Skip to content

Commit

Permalink
Merge pull request #16 from dreadnode/workflow/fix-sha-ref-issues
Browse files Browse the repository at this point in the history
fix: workflow cannot find commit hashes
  • Loading branch information
evilsocket authored Nov 7, 2024
2 parents 145f702 + 8cf7a80 commit 0d98c9e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/validate_robopages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
fetch-depth: 0 # Fetch all history
ref: ${{ github.head_ref }} # Checkout the PR branch

- name: Set up Docker
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # 3.7.1
Expand All @@ -29,7 +32,7 @@ jobs:
validate_file() {
local file="$1"
if [[ ! "$file" =~ ^[a-zA-Z0-9_\-./]+\.yml$ ]]; then
if [[ ! "$file" =~ ^([a-zA-Z0-9_\-]+/)*[a-zA-Z0-9_\-]+\.yml$ ]]; then
echo "Invalid file path characters: $file"
return 1
fi
Expand All @@ -41,14 +44,16 @@ jobs:
docker pull dreadnode/robopages:latest
# Run validation
# Run validation with Docker socket mounted
docker run --rm \
-v $(pwd):/workspace \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /workspace \
dreadnode/robopages:latest validate --path "$(printf '%q' "$file")"
--privileged \
dreadnode/robopages:latest validate --path "$(printf '%q' "$file")" --skip-docker
}
# Get changed files, excluding .github directory
# Get changed files using GitHub's provided variables
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | \
grep '\.yml$' | grep -v '^.github/' || true)
Expand Down
7 changes: 6 additions & 1 deletion cybersecurity/offensive/information-gathering/amass.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
description: The OWASP Amass Project performs network mapping of attack surfaces and external asset discovery using open source information gathering and active reconnaissance techniques.

categories:
- information-gathering
- reconnaissance
- dns-enumeration

functions:
amass_enum:
description: Perform DNS enumeration and network mapping of systems exposed to the Internet.
Expand All @@ -17,7 +22,7 @@ functions:
- amass
- enum
- -brute
- -min-for-recursive
- -min-for-recursive
- '2'
- -d
- ${target}
Expand Down

0 comments on commit 0d98c9e

Please sign in to comment.