Works with the AI Agents you already use
Bitbucket Pipelines Security Audit
by CashonlyTian
Audit your `bitbucket-pipelines.yml` before pushing it to a runner.
$7
Bitbucket Pipelines Security Audit
Example session with this skill installed
Audit the bitbucket-pipelines.yml in the current directory for the 'ProjectAlpha' project.
- Read your context and instructions
- Compiled the bitbucket pipelines security
- Generated the document
I have completed the security audit for ProjectAlpha. The scan analyzed your bitbucket-pipelines.yml against 10 security categories.
Score: 24/100 | Grade: F | Risk: CRITICAL
Found 31 findings across all 10 categories: 5 script_injection, 7 secrets_in_config, 5 image_pinning, 2 pipe_pinning, 2 trigger_scope, 2 clone_hygiene, 1 deploy_gating, 4 artifact_exposure, 1 runner_security, 2 docker_privilege.
Security Audit Report
| Category | Score | Status |
|---|---|---|
| Script Injection | 0/15 | FAILED - $BITBUCKET_BRANCH used in script |
| Secrets in Config | 0/15 | FAILED - Hardcoded auth token in pipe |
| Image Pinning | 0/10 | FAILED - Using :latest for 'node' image |
| Pipe Pinning | 6/10 | WARNING - 2 unpinned pipes |
| Trigger Scope | 6/10 | WARNING - '**' trigger on default pipeline |
| Clone Hygiene | 6/10 | WARNING - clone depth: full, skip-ssl-verify enabled |
| Deploy Gating | 0/10 | FAILED - Auto-deploy on all branches |
| Artifact Exposure | 2/10 | FAILED - Artifacts leak .env and credentials |
| Runner Security | 0/5 | FAILED - Self-hosted runner on PR builds |
| Docker Privilege | 4/5 | WARNING - Docker-in-Docker for fork code |
Prioritized Fixes
Gate Deployments: Add trigger: manual to your deployment: production step. It currently runs automatically on every push.
2.
Sanitize Scripts: Remove $BITBUCKET_BRANCH from your bash scripts. Use a mapping table or shell-safe environment variables to prevent command injection.
3.
Pin Images: Replace image: node:latest with a specific version like image: node:20.11.0 or a SHA256 digest to ensure build reproducibility and security.
4. Remove Secrets: Move the hardcoded token to a Bitbucket Secured Variable.
Results saved to:
- Card:
scan-2024-05-20.png - Detailed Report:
scan-report.md
Next steps
- Move the hardcoded token on line 42 to a Bitbucket Secured Variable.
- Update the production step to require a manual trigger.
- Re-run the audit to verify your improved score.
Clean demo (demo-clean): Score: 100/100 | Grade: A | Risk: LOW | 0 findings.
scan-2024-05-20.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Audit your bitbucket-pipelines.yml before pushing it to a runner. This skill identifies critical vulnerabilities that lead to credential theft, runner hijacking, and unauthorized deployments. It provides a objective 0-100 score, a visual risk grade, and a prioritized remediation report.
What it does
- Script injection detection identifies variables like
$BITBUCKET_BRANCHinterpolated directly into scripts, preventing fork-controlled code execution. - Secrets scanning flags hardcoded passwords, tokens, and keys in script blocks, pipe variables, service variables, and image authentication.
- Dependency pinning check ensures every container image and pipe uses specific versions or digests rather than the
:latesttag. - Deployment gating audit verifies that all deployment steps are protected by manual triggers or scoped to custom pipelines.
- Infrastructure safety review detects insecure self-hosted runner configurations and privileged Docker-in-Docker usage in pull request builds.
- Artifact leak prevention scans artifact paths and custom caches for sensitive files like
.env,.pem, or SSH keys.
How it works
- Target the directory by providing the local path containing your Bitbucket configuration files.
- Execute the audit to trigger the local-only scan that evaluates the config against 10 distinct security categories.
- Review the scorecard to see the 0-100 grade, risk level (Low to Critical), and finding counts by severity.
- Follow the fix report to remediate high-priority issues, starting with secret masking and deployment gating.
Frameworks & tools
Built for Bitbucket Pipelines. Works with any project using bitbucket-pipelines.yml, including those using self-hosted runners or Atlassian pipes.
Why this beats prompting it yourself
Generic LLMs often miss specific Bitbucket-native risks like $BITBUCKET_BRANCH injection or improper deployment: triggers. This skill uses a structured 10-point scoring system to provide a repeatable, objective security posture rather than subjective advice.
Use cases
- Auditing a newly generated pipeline file before the first push.
- Reviewing third-party or tutorial-sourced configs for hidden security flaws.
- Generating a security scorecard for client deliverables or internal compliance.
- Verifying that pull request builds cannot access sensitive self-hosted infrastructure.
Known limitations
Does not scan live Bitbucket workspace settings, repository variables, or branch permissions. Limited to local file analysis. Does not perform CVE scans on the contents of container images.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Scans local config files only. Does not check live Bitbucket workspace settings, branch permissions, or deployment variables. Not a CVE scanner for image vulnerabilities.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
Python 3Pillow