Error: Resource not accessible by integration
Warning: This run of the CodeQL Action does not have permission to access
the CodeQL Action API endpoints
Added:
jobs:
analyze:
permissions:
actions: read # Read workflow data
contents: read # Read repository
security-events: write # Upload scan resultsWhy: CodeQL needs explicit permission to upload security scan results to GitHub's Security tab.
Added:
permissions:
contents: read # Read repository
id-token: write # For PyPI trusted publishingWhy: Ensures the workflow can read code and deploy packages securely.
- ❌ CodeQL couldn't upload scan results
- ❌ Security events were blocked
- ❌ "Resource not accessible" errors
- ❌ Security tab showed no results
- ✅ CodeQL uploads scan results successfully
- ✅ Security events are recorded
- ✅ No permission errors
- ✅ Results appear in Security tab
Go to: https://github.com/frankosakwe/Lunar-forge/actions
Expected Result:
- ✅ CodeQL workflow completes successfully
- ✅ No permission errors in logs
- ✅ Green checkmarks on all runs
Go to: https://github.com/frankosakwe/Lunar-forge/security/code-scanning
Expected Result:
- ✅ CodeQL analysis results displayed
- ✅ Security alerts (if any) shown
- ✅ Scan history visible
Wait for next push or manually trigger:
# Manually trigger CodeQL
gh workflow run codeql-analysis.yml| File | Change | Purpose |
|---|---|---|
codeql-analysis.yml |
Added job permissions | Allow security event uploads |
continuous-integration-workflow.yml |
Added workflow permissions | Enable secure deployment |
GITHUB_ACTIONS_FIX.md |
Created documentation | Explain the fix |
FIXES_APPLIED.md |
Created summary | Quick reference |
The next time GitHub Actions runs (on next push), you should see:
✓ Checkout repository
✓ Initialize CodeQL
✓ Autobuild
✓ Perform CodeQL Analysis
✓ Upload results to Security tab ← This should now work!
✓ lint
✓ type-check
✓ test
✓ integration
✓ complete
- 🔍 Automatic vulnerability detection
- 🚨 Security alerts for new issues
- 📊 Dependency scanning
- 🔄 Continuous monitoring
- ✅ CodeQL analysis running
- ✅ Results uploaded to Security tab
- ✅ Automated security checks
- ✅ Integration with pull requests
- Reads workflow run information
- Required for CodeQL API access
- Allows checking action status
- Reads repository code
- Required for all workflows
- Standard permission for CI/CD
- Uploads security scan results
- Required for CodeQL
- Enables Security tab integration
- Generates OIDC tokens
- Required for trusted publishing
- Enables secure PyPI deployment
After pushing fixes, verify:
- Go to Actions tab
- Check CodeQL workflow status
- Verify no permission errors in logs
- Check Security tab shows results
- Review any security alerts
- Confirm all workflows pass
jobs:
analyze:
runs-on: ubuntu-latest
# ❌ No permissions specifiedjobs:
analyze:
runs-on: ubuntu-latest
permissions: # ✅ Explicit permissions
actions: read
contents: read
security-events: write- Go to:
Settings → Actions → General - Under "Workflow permissions":
- Ensure workflows have necessary permissions
- May need "Read and write permissions"
- Go to:
Settings → Code security and analysis - Ensure "Code scanning" is enabled
- Verify CodeQL analysis is active
# Trigger workflow manually to test
gh workflow run codeql-analysis.yml
gh run watchDetailed documentation available in:
- GITHUB_ACTIONS_FIX.md - Comprehensive fix explanation
- TESTING_SUMMARY.md - Testing guidance
- PROJECT_STATUS.md - Overall project status
You'll know it's working when:
- ✅ No "Resource not accessible" errors
- ✅ CodeQL completes without warnings
- ✅ Security tab shows scan results
- ✅ Green checkmarks on all workflows
- ✅ No permission-related failures
GitHub Actions will now:
- ✅ Run on every push
- ✅ Scan for security issues
- ✅ Upload results automatically
- ✅ Alert on vulnerabilities
- ✅ Block dangerous PRs (if configured)
If you still see permission errors:
- Read GITHUB_ACTIONS_FIX.md for troubleshooting
- Check workflow logs for specific errors
- Verify repository settings
- Check GitHub Actions status: https://www.githubstatus.com/
Fix Applied: ✅ Complete
Pushed to GitHub: ✅ Yes
Commit: 10d37019
Branch: main
Ready for Testing: ✅ Yes
Next GitHub Action run will verify the fix! 🚀
Last Updated: June 20, 2026
Applied By: Kiro AI Assistant
Status: ✅ Ready for Verification