APort Policy Verification Action v1.0.0
π‘οΈ Secure Your Repositories with AI Agent Verification
We're excited to announce the first public release of the APort Policy Verification GitHub Action! This powerful security tool ensures only authorized AI agents and bots can make changes to your repositories, providing enterprise-grade protection for your development workflows.
β¨ What's New in v1.0.0
π Core Security Features
- Policy Enforcement - Verify pull requests against APort agent policies
- GitHub Integration - Seamless integration with GitHub Actions workflows
- Context Mapping - Automatic mapping of GitHub context to APort policies
- Flexible Configuration - Customizable policy packs and enforcement rules
- PR Comments - Automatic PR comments with detailed policy results
- Multiple Triggers - Support for various GitHub events and manual dispatch
π― Advanced Capabilities
- Repository Safety (repo.v1) - Comprehensive repository-level safety policies
- Actor Validation - Verify GitHub actors and apps are authorized
- Size Limits - Prevent oversized PRs and file uploads
- Review Requirements - Enforce code review policies
- Path Allowlists - Restrict file access patterns
- Branch Protection - Control which branches can receive PRs
οΏ½οΏ½ Key Features Overview
| Feature | Description | Impact |
|---|---|---|
| π‘οΈ Policy Enforcement | Verify PRs against APort agent policies | High Security |
| π GitHub Integration | Seamless workflow integration | Easy Adoption |
| π PR Comments | Automatic policy result reporting | Clear Feedback |
| βοΈ Flexible Config | Customizable policy packs | Enterprise Ready |
| π Context Mapping | Auto-maps GitHub context to policies | Smart Automation |
οΏ½οΏ½ Quick Start
1. Basic Setup (30 seconds)
name: APort Policy Check
on: [pull_request]
jobs:
policy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aporthq/policy-verify-action@v1
with:
agent-id: ${{ secrets.APORT_AGENT_ID }}2. Advanced Configuration
name: Advanced APort Policy Check
on:
pull_request:
types: [opened, synchronize, labeled, ready_for_review]
workflow_dispatch:
inputs:
agent_id:
description: 'Agent ID to verify'
required: true
jobs:
policy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: APort Policy Verification
uses: aporthq/policy-verify-action@v1
with:
agent-id: ${{ github.event.inputs.agent_id || secrets.APORT_AGENT_ID }}
policy-pack: ['repo.v1'](https://aport.io/policy-packs/repo.v1/)
api-base: 'https://api.aport.io'
fail-on-violation: true
comment-on-pr: trueπ§ Configuration Options
Input Parameters
| Parameter | Description | Required | Default |
|---|---|---|---|
agent-id |
APort Agent ID for verification | β | - |
policy-pack |
Policy pack to enforce | β | repo.v1 |
api-base |
APort API base URL | β | https://api.aport.io |
fail-on-violation |
Fail workflow on policy violation | β | true |
comment-on-pr |
Add PR comment with results | β | true |
Output Values
| Output | Description |
|---|---|
allowed |
Boolean indicating if action is allowed |
reasons |
JSON array of policy violation reasons |
π Policy Packs
repo.v1 - Repository Safety
Enforces comprehensive repository-level safety policies:
Required Capabilities:
repo.pr.create- Create pull requestsrepo.merge- Merge pull requests
Required Limits:
max_prs_per_day- Daily PR creation limitmax_merges_per_day- Daily merge limitmax_pr_size_kb- Maximum PR size in KB
Enforcement Rules:
- Repository Allowlist - Restrict which repositories the agent can act on
- Base Branch Allowlist - Control which branches can receive PRs
- Path Allowlist - Restrict file access patterns
- Size Limits - Prevent oversized PRs and file uploads
- Review Requirements - Enforce code review policies
- GitHub Actor Validation - Verify the GitHub actor is authorized
- GitHub App Validation - Verify the GitHub app is authorized
Minimum Assurance Level: L2 (Level 2)
π Context Mapping
The action automatically maps GitHub context to APort policy context:
| GitHub Context | APort Context | Description |
|---|---|---|
github.repository |
repo |
Repository name |
github.event.pull_request.base.ref |
base_branch |
Target branch |
github.actor |
github_actor |
GitHub actor |
github.app |
github_app |
GitHub app |
| Computed diff stats | files_changed, lines_added |
Change statistics |
| PR size calculation | pr_size_kb |
PR size in KB for size limits |
| Changed file paths | file_paths |
File paths for path allowlist enforcement |
| Review requirements | requires_review |
Whether review is required |
| PR labels | labels |
Pull request labels |
| Review count | reviews |
Number of reviews |
| Draft status | is_draft |
Whether PR is draft |
| Mergeable status | is_mergeable |
Whether PR can be merged |
ποΈ Setup Guide
1. Create APort Agent
- Go to APort Dashboard
- Create a new agent
- Configure policy settings
- Note the Agent ID
2. Set GitHub Secrets
Add the following secrets to your repository:
# Required
APORT_AGENT_ID=your-agent-id-here
# Optional (for PR comments)
GITHUB_TOKEN=your-github-token3. Configure Agent Passport (NOT TESTED)
In your APort agent passport, set up the following:
{
"integrations": {
"github": {
"allowed_actors": ["your-bot[bot]", "acme-ci"],
"allowed_apps": ["your-github-app"]
}
},
"capabilities": ["repo.v1"],
"assurance_level": 3
}π¨ Troubleshooting
Common Issues
-
Agent not found
- Verify
APORT_AGENT_IDis correct - Check agent exists in APort dashboard
- Verify
-
Policy violations
- Review agent passport configuration
- Check policy pack requirements
- Verify GitHub actor/app permissions
-
API errors
- Verify
api-baseURL is correct - Check network connectivity
- Review API rate limits
- Verify
Debug Mode
Enable debug logging:
- name: APort Policy Verification
uses: aporthq/policy-verify-action@v1
with:
agent-id: ${{ secrets.APORT_AGENT_ID }}
debug: trueπ Examples & Documentation
Complete Examples
Documentation
π€ Community & Support
Get Help
- π Documentation
- π Issue Tracker
- π§ Email Support
Contribute
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
What's Next
Upcoming Features (v1.1.0)
- Custom Policy Packs - Create your own policy configurations
- Enhanced Logging - More detailed debug information
- Performance Metrics - Track action execution times
- Multi-Agent Support - Verify multiple agents in one workflow
Future Roadmap
- Enterprise Features - Advanced compliance reporting
- Integration Hub - Connect with more CI/CD tools
- Policy Templates - Pre-built policy configurations
- Analytics Dashboard - Usage and compliance insights
* License & Legal**
- License: MIT License
- Privacy: Privacy Policy
- Terms: Terms of Service
Thank You
Thank you to all the contributors, testers, and early adopters who helped make this release possible! Your feedback and support have been invaluable in creating a robust and secure solution for AI agent verification.
Ready to secure your repositories? Get started now! π
*For more information, visit aport.io *