diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 64ea553..b381ffb 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -15,10 +15,48 @@ permissions: pull-requests: read jobs: + zap_scan: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Create directories for ZAP + run: | + mkdir -p zap-reports zap-home + chmod -R 777 zap-reports zap-home # Ensure write permissions + + - name: Run ZAP scan + run: | + echo "Starting ZAP scan..." + docker run -v $(pwd)/zap-reports:/zap/wrk:rw -v $(pwd)/zap-home:/zap/.ZAP:rw ghcr.io/zaproxy/zaproxy:stable zap.sh -cmd -quickurl https://your-target-app.com -quickout /zap/wrk/report.html + echo "ZAP scan completed" + ls -la zap-reports/ + + - name: Check ZAP scan results + run: | + echo "=== ZAP Scan Results ===" + ls -la zap-reports/ + if [ -f zap-reports/report.html ]; then + echo "HTML report generated successfully" + else + echo "Warning: HTML report not found" + fi + + - name: Upload ZAP scan reports + uses: actions/upload-artifact@v4 + with: + name: zap-scan-reports-50 + path: zap-reports/ + if-no-files-found: warn + retention-days: 30 + compression-level: 6 + overwrite: false + include-hidden-files: false + tag_on_pr_merge: if: github.event_name == 'pull_request' && github.event.pull_request.merged == true runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v4 @@ -86,7 +124,6 @@ jobs: tag_on_direct_push: if: github.event_name == 'push' && github.actor != 'web-flow' runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/slack-notify-v2.yml b/.github/workflows/slack-notify-v2.yml index 823550e..c93cc3f 100644 --- a/.github/workflows/slack-notify-v2.yml +++ b/.github/workflows/slack-notify-v2.yml @@ -17,12 +17,30 @@ on: - review_requested - review_request_removed pull_request_review: - types: [submitted, edited, dismissed] + types: + - submitted + - edited + - dismissed pull_request_review_comment: - types: [created, edited, deleted] + types: + - created + - edited + - deleted + discussion: + types: + - created + - edited + - deleted + - answered + - unanswered + discussion_comment: + types: + - created + - edited + - deleted concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.sha }}-${{ github.run_id }} cancel-in-progress: false env: @@ -75,6 +93,11 @@ jobs: echo "TITLE=${{ github.event.pull_request.title }}" >> $GITHUB_ENV echo "TITLE_LINK=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV echo "NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV + elif [[ "$GITHUB_EVENT_NAME" == "discussion" || "$GITHUB_EVENT_NAME" == "discussion_comment" ]]; then + echo "THREAD_KEY=${{ github.repository }}-discussion-${{ github.event.discussion.number }}" >> $GITHUB_ENV + echo "TITLE=${{ github.event.discussion.title }}" >> $GITHUB_ENV + echo "TITLE_LINK=${{ github.event.discussion.html_url }}" >> $GITHUB_ENV + echo "NUMBER=${{ github.event.discussion.number }}" >> $GITHUB_ENV fi echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV diff --git a/Directory Structure b/Directory Structure new file mode 100644 index 0000000..9dfa329 --- /dev/null +++ b/Directory Structure @@ -0,0 +1,18 @@ +# Directory Structure +# ------------------- +# .github/ +# ├── workflows/ +# │ └── slack-notify-v2.yml +# scripts/ +# ├── send_to_slack.py +# ├── slack_utils.py +# └── thread_tracker.py + +# File: scripts/send_to_slack.py + +# File: scripts/slack_utils.py + +# File: scripts/thread_tracker.py (not used in current flow, optional for local fallback) + + +# File: .github/workflows/slack-notify-v2.yml diff --git a/README.md b/README.md index 3aa88dd..9e9743f 100644 --- a/README.md +++ b/README.md @@ -27,5 +27,3 @@ pnpm create next-app --example with-playwright with-playwright-app Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). - -