Skip to content

Add CI and Zig security audit workflow - #1

Merged
midasdf merged 2 commits into
mainfrom
ci/add-security-workflow
Apr 2, 2026
Merged

midasdf merged 2 commits into
mainfrom
ci/add-security-workflow

Conversation

@midasdf

@midasdf midasdf commented Apr 2, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

  • GitHub Actions CI: build, test, format check
  • Zig security audit: tracks unsafe/low-level patterns
  • Runs on push, PR, and weekly schedule (Monday 00:00 UTC)

check job

  • zig fmt --check src/ — format verification
  • zig build — compilation check
  • zig build test — test execution (where available)

security-audit job

  • Scans: @ptrCast, @ptrFromInt, @intFromPtr, @alignCast, catch unreachable, orelse unreachable, @setRuntimeSafety(false), @cImport
  • Reports pattern counts in Actions job summary
  • Adds warning annotations on changed files in PRs
  • Informational only — does not block CI

CodeAnt-AI Description

Add CI checks and a Zig security audit for pull requests

What Changed

  • New CI runs on pushes, pull requests, and a weekly schedule to check formatting and build the project.
  • Format checks no longer block the rest of CI, so build results still run even if formatting needs work.
  • Pull requests now get a security audit summary that highlights risky Zig patterns and adds warnings on changed files.

Impact

✅ Earlier detection of build failures
✅ Fewer blocked CI runs from formatting issues
✅ Clearer review warnings for risky Zig code

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Apr 2, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Apr 2, 2026
@codeant-ai

codeant-ai Bot commented Apr 2, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR is currently an empty shell; no code changes or workflow files were detected in the submission. While the intended plan to implement GitHub Actions for Zig (including formatting, build, and security audits) is well-defined, the implementation cannot be verified. Codacy reports the PR as 'up to standards', but this is a false positive resulting from the lack of files to analyze. All identified acceptance criteria regarding the CI pipeline and security scanner remain unaddressed.

About this PR

  • The PR contains no file changes. It is impossible to verify the implementation of the CI workflow or the security audit script without the source code.

Test suggestions

  • Workflow triggers on push, PR, and schedule
  • Format check failure on unformatted code
  • Build failure on compilation errors
  • Test execution and failure reporting
  • Identification of specified unsafe Zig patterns by the audit job
  • Audit job reports findings without failing the CI pipeline
  • Generation of job summary and PR annotations from audit results
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Workflow triggers on push, PR, and schedule
2. Format check failure on unformatted code
3. Build failure on compilation errors
4. Test execution and failure reporting
5. Identification of specified unsafe Zig patterns by the audit job
6. Audit job reports findings without failing the CI pipeline
7. Generation of job summary and PR annotations from audit results
Low confidence findings
  • There are no tests included to verify the accuracy of the security audit's pattern-matching logic (e.g., ensuring @ptrCast is correctly identified and reported).

🗒️ Improve review quality by adding custom instructions

@codacy-production

codacy-production Bot commented Apr 2, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes. Give us feedback

@coderabbitai

coderabbitai Bot commented Apr 2, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@midasdf has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 52 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4478d878-c8a0-4607-909a-0ad6048d0371

📥 Commits

Reviewing files that changed from the base of the PR and between 4f9daa9 and 654d6f8.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-security-workflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai

codeant-ai Bot commented Apr 2, 2026

Copy link
Copy Markdown

CodeAnt AI is running Incremental review

@deepsource-io

deepsource-io Bot commented Apr 2, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 4f9daa9...654d6f8 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Secrets Apr 2, 2026 8:14p.m. Review ↗

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels Apr 2, 2026
@codeant-ai

codeant-ai Bot commented Apr 2, 2026

Copy link
Copy Markdown

CodeAnt AI Incremental review completed.

@midasdf
midasdf merged commit 173cbea into main Apr 2, 2026
5 checks passed
@midasdf
midasdf deleted the ci/add-security-workflow branch April 2, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant