Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
20 changes: 11 additions & 9 deletions .github/workflows/create-release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Pull latest changes
run: |
# Ensure we have the version bump commit
git pull origin main

- name: Create tags
id: tags
run: |
Expand All @@ -66,11 +61,17 @@ jobs:
continue
fi

# Create annotated tag
git tag -a "$TAG" -m "Release ${plugin} v${VERSION}
# Create annotated tag on the version bump commit (not HEAD which may have moved)
COMMIT_SHA="${{ github.event.client_payload.commit_sha }}"
if [ -z "$COMMIT_SHA" ]; then
echo "::error::commit_sha not provided in payload"
exit 1
fi

git tag -a "$TAG" "$COMMIT_SHA" -m "Release ${plugin} v${VERSION}

Auto-generated by GitHub Actions workflow.
Trigger commit: ${{ github.event.client_payload.trigger_sha }}"
Version bump commit: $COMMIT_SHA"

echo "Created tag: $TAG"
CREATED_TAGS+=("$TAG")
Expand Down Expand Up @@ -115,4 +116,5 @@ Trigger commit: ${{ github.event.client_payload.trigger_sha }}"

echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "**Trigger commit:** \`${{ github.event.client_payload.trigger_sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Version bump commit (tagged):** \`${{ github.event.client_payload.commit_sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Original trigger commit:** \`${{ github.event.client_payload.trigger_sha }}\`" >> $GITHUB_STEP_SUMMARY
11 changes: 8 additions & 3 deletions .github/workflows/detect-plugin-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2 # Need HEAD~1 for diff comparison
fetch-depth: 0 # Full history for multi-commit push detection

- name: Detect changed plugins
id: changes
Expand All @@ -63,8 +63,13 @@ jobs:
# Local plugins to check (excludes external golang-workflow)
LOCAL_PLUGINS=("security-hooks" "todo-log" "version-control" "bash-workflow" "claude-code-guide" "slash-command-guide")

# Get changed files between HEAD and HEAD~1
CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null || git diff --name-only HEAD)
# Get changed files since push started (handles multi-commit pushes)
if [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
CHANGED_FILES=$(git diff --name-only "${{ github.event.before }}" HEAD)
else
Comment on lines +66 to +69

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard missing github.event.before on workflow_dispatch

For workflow_dispatch runs, github.event.before is not set, so this branch executes git diff --name-only "" HEAD. Git treats an empty revision as invalid (see git diff usage: git diff [<options>] [<commit>] ...), which exits non‑zero; with the default bash -e this aborts the job before any manual bump can run. This change therefore breaks manual executions of the workflow unless before is present; consider checking for a non-empty SHA before using it and falling back to the existing HEAD~1 logic.

Useful? React with 👍 / 👎.

# Initial push or force push - compare with HEAD~1 as fallback
CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null || git diff --name-only HEAD)
fi
echo "Changed files:"
echo "$CHANGED_FILES"

Expand Down
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Claude Code plugin marketplace with seven plugins:
/plugin list
/hooks
claude --debug

# Set GitHub secret from current auth token (no intermediate files)
gh auth token | gh secret set SECRET_NAME
```

### Development Workflow
Expand Down
21 changes: 21 additions & 0 deletions bash-workflow/agents/plan-devops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: plan-devops
description: "Analyze operational considerations for bash tasks. Focuses on portability, CI/CD, and idempotency."
model: haiku
color: purple
---

Analyze operational requirements for the given bash task.

## Focus Areas

1. **Portability** - macOS vs Linux, BSD vs GNU, path differences
2. **CI/CD** - Exit codes, output parsing, env expectations
3. **Deployment** - Installation, dependencies, upgrades
4. **Idempotency** - Safe reruns, state management, cleanup

## Output

Write to `~/.claude/bash-workflow/plan-devops.md`:
- Platform compatibility notes
- CI/CD and idempotency strategy
22 changes: 22 additions & 0 deletions bash-workflow/agents/plan-implementation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: plan-implementation
description: "Design implementation approach for bash tasks. Focuses on script structure, function decomposition, and dependencies."
model: haiku
color: blue
---

Design the implementation approach for the given bash task.

## Focus Areas

1. **Script Structure** - Entry points, module separation, config handling
2. **Function Decomposition** - Single responsibility, reusable utilities
3. **Dependencies** - Implementation order, shared resources
4. **Codebase Patterns** - Existing conventions, error/logging patterns

## Output

Write to `~/.claude/bash-workflow/plan-implementation.md`:
- Proposed file structure
- Key functions and responsibilities
- Implementation order
21 changes: 21 additions & 0 deletions bash-workflow/agents/plan-security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: plan-security
description: "Design security considerations for bash tasks. Focuses on input validation, permissions, and secrets."
model: haiku
color: orange
---

Identify security considerations for the given bash task.

## Focus Areas

1. **Input Validation** - Sanitization, path traversal, injection prevention
2. **Permissions** - File modes, sudo usage, umask
3. **Secrets** - No hardcoding, env vars, secure storage
4. **Unsafe Patterns** - eval, unquoted vars, glob risks, temp files

## Output

Write to `~/.claude/bash-workflow/plan-security.md`:
- Input validation requirements
- Permission model and secret handling
21 changes: 21 additions & 0 deletions bash-workflow/agents/plan-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: plan-testing
description: "Design test strategy for bash tasks. Focuses on bats tests, edge cases, and failure modes."
model: haiku
color: green
---

Design comprehensive test coverage for the given bash task.

## Focus Areas

1. **Behaviors** - Happy path, error handling, edge cases
2. **Edge Cases** - Empty input, missing files, bad permissions, signals
3. **Failure Modes** - Network, disk full, permission denied
4. **Platforms** - macOS vs Linux, BSD vs GNU tools

## Output

Write to `~/.claude/bash-workflow/plan-testing.md`:
- Test scenarios by feature
- Edge cases and failure modes
2 changes: 1 addition & 1 deletion security-hooks/scripts/check_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def _run_secret_check(project_root: Path) -> None:
}
}
print(json.dumps(output))
sys.exit(ExitCode.SUCCESS) # Use exit 0 with JSON output
sys.exit(ExitCode.BLOCKED) # Exit 2 ensures Claude sees the deny decision

sys.exit(ExitCode.SUCCESS)

Expand Down
4 changes: 2 additions & 2 deletions security-hooks/scripts/test_check_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,8 @@ def mock_subprocess_run(
with pytest.raises(SystemExit) as exc_info:
main()

# With JSON output, exit code is 0 (success) but with deny decision
assert exc_info.value.code == ExitCode.SUCCESS
# Exit code 2 (BLOCKED) ensures Claude respects the deny decision
assert exc_info.value.code == ExitCode.BLOCKED

# Verify JSON output structure
captured = capsys.readouterr()
Expand Down