Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: workflow cannot find commit hashes #16

Merged
merged 8 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/validate_robopages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- '!.github/**'
branches:
- main
- workflow/fix-sha-ref-issues

jobs:
validate:
Expand All @@ -18,6 +19,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 +33,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 @@ -48,7 +52,7 @@ jobs:
dreadnode/robopages:latest validate --path "$(printf '%q' "$file")"
}

# 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
Loading