-
Notifications
You must be signed in to change notification settings - Fork 0
Copilot & Agent configuration #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
AquaSec has completed a full security repository scan ✅ You can find the analysis results for this PR branch on this overview.
|
WalkthroughAdds five AI agent role specification files and a copilot instructions guide; adds a local CI quality-gates script; simplifies the AquaSec GitHub Actions workflow to a SARIF existence check and upload; and introduces a test SARIF file ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@ci_local.sh`:
- Around line 9-16: The shell invocation currently expands unquoted $(git
ls-files '*.py') which breaks on filenames with whitespace; change the two calls
that pass $(git ls-files '*.py') to Black and Pylint to use NUL-delimited file
lists instead (e.g. use git ls-files -z '*.py' | xargs -0 black --check or git
ls-files -z '*.py' | xargs -0 pylint --fail-under=9.5) or capture into a
NUL-aware array (mapfile -d '' FILES < <(git ls-files -z '*.py') && black
--check "${FILES[@]}"); update the occurrences referencing black and pylint so
filenames are handled safely.
🧹 Nitpick comments (1)
.github/agents/reviewer.agent.md (1)
21-21: Consider the maintenance implications of hardcoded implementation details.The reference to
ROUTE_HANDLERSinevent_gate_lambda.pyprovides clear guidance but will require updates if the implementation pattern changes. Consider adding a note that this specification should be reviewed when architectural changes occur.
miroslavpojer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing the copilot rules file for reviewer. He is very helpfull.
I have checked usage of rulesets.
- I see there is some unsupported setup.
- When signed commit will be enabled then copilot refuse to work.
- It can be fixed by bypassing the copilot for PR only.
Could you introduce rulesets, add bypass and update the related handbook pages with this technical tip?
| - Handlers: `HandlerApi`, `HandlerToken`, `HandlerTopic`, `HandlerHealth` in `src/handlers/` | ||
| - Writers: `WriterEventBridge`, `WriterKafka`, `WriterPostgres` in `src/writers/` (inherit from `Writer` base class) | ||
| - Config: `conf/config.json`, `conf/access.json`, `conf/topic_schemas/*.json` | ||
| - Routes defined in `ROUTE_HANDLERS` dict in `event_gate_lambda.py` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
- Terraform scripts are not part of this repository
| - Routes defined in `ROUTE_HANDLERS` dict in `event_gate_lambda.py` | ||
|
|
||
| Coding guidelines | ||
| - Keep changes small and focused |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add
- Preserve existing formatting and conventions.
| @@ -0,0 +1,29 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to add also a lint prompt to use this script.
Something like .github/prompts/lint.prompt.md with this content:
---
mode: agent
description: Lint code in the project using Pylint, Black, and mypy tools
---
Your task is to lint the code in the project using Pylint, Black, and mypy tools. Follow the instructions below to perform the linting process.
## Instructions
- run ci_local.sh - The command is going to take a while to finish, make sure you give it enough time to complete before looking for results.
- Analyze the output from each tool and identify any issues or areas for improvement in the code.
- Provide a summary of the linting results, including any errors or warnings found by each toolThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/aquasec_repo_scan.yml:
- Around line 28-38: The workflow currently only verifies a static file
("test_aquasec_scan.sarif") and uploads it (steps "Verify SARIF file exists" and
"Upload Scan Results to GitHub Security"), so restore the real AquaSec scanning
steps or make the purpose explicit: either (A) replace the check-and-upload of
test_aquasec_scan.sarif with the original authentication, API call, scanner
invocation, SARIF conversion, and output path used by the "AquaSec Full
Repository Scan" job so actual scanning runs and generates a real SARIF file
before upload, or (B) if this is intended as a test, rename the workflow and job
and add a conditional (e.g., only: branches: [ci-test] or an env flag) and
documentation to clearly mark it as a mock; locate the steps by the step names
"Verify SARIF file exists" and "Upload Scan Results to GitHub Security" and the
test artifact name test_aquasec_scan.sarif to make the necessary edits.
This reverts commit 4b5662b.
Overview
Adds detailed agent role definitions for DevOps Engineer, Reviewer, SDET, Senior Developer, and Specification Master in the
.github/agents/directory. Introducescopilot-instructions.mdfile to have copilot instruction setted for the project.Release Notes
Related
Closes #107
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.