Skip to content

Dev into qa#93

Merged
fpittelo merged 11 commits intoqafrom
dev
Nov 28, 2025
Merged

Dev into qa#93
fpittelo merged 11 commits intoqafrom
dev

Conversation

@fpittelo
Copy link
Owner

Dev into qa

@fpittelo fpittelo self-assigned this Nov 28, 2025
@fpittelo fpittelo added the enhancement New feature or request label Nov 28, 2025
@github-actions
Copy link

🤖 Hi @fpittelo, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@gemini-code-assist
Copy link

Summary of Changes

Hello @fpittelo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on bolstering the project's security posture and formalizing AI-driven automation workflows. It introduces a robust system for managing sensitive API keys dynamically through Azure Key Vault and Managed Identities, eliminating the risk of hardcoded secrets. Concurrently, network access to critical backend services has been restricted to enhance overall system security. The project's documentation has also been significantly improved to reflect these architectural changes and provide clearer guidance on development and security practices.

Highlights

  • New Gemini CLI Command Definitions: Four new Gemini CLI command definition files (gemini-invoke.toml, gemini-review.toml, gemini-scheduled-triage.toml, gemini-triage.toml) have been added, outlining personas, principles, constraints, and workflows for autonomous AI agents within GitHub Actions for tasks like general invocation, code review, and issue triage.
  • Enhanced Infrastructure Security: The Terraform configuration has been updated to implement dynamic secret management for the Azure OpenAI API key using Azure Key Vault and Managed Identities, removing hardcoded secrets. Network access controls for Key Vault and PostgreSQL have also been tightened, denying public internet access and allowing only trusted Azure Services.
  • Updated Project Documentation: The docs/specifications.md file has been extensively refactored for clarity, detailing functional and non-functional requirements, and significantly enhancing the technical design section with specifics on secrets management, network security, and CI/CD. The README.md also includes a new dedicated security section.
  • Git Ignore Updates: The .gitignore file has been updated to exclude Gemini-related directories and credential files, ensuring sensitive or temporary files are not committed to the repository.
Ignored Files
  • Ignored by pattern: .github/workflows/** (7)
    • .github/workflows/deploy-infra.yaml
    • .github/workflows/destroy-infra.yaml
    • .github/workflows/gemini-dispatch.yml
    • .github/workflows/gemini-invoke.yml
    • .github/workflows/gemini-review.yml
    • .github/workflows/gemini-scheduled-triage.yml
    • .github/workflows/gemini-triage.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🤖 I'm sorry @fpittelo, but I was unable to process your request. Please see the logs for more details.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant security enhancements by migrating the OpenAI API key to Azure Key Vault and utilizing Managed Identities for access, which is a commendable best practice. The addition of network ACLs to the Key Vault and PostgreSQL further hardens the infrastructure. The PR also includes new Gemini-based AI command prompts and updates to documentation to reflect these architectural changes. My review includes a few minor suggestions to improve the clarity and consistency of the new AI prompts and a recommendation for further network security improvements.

5. **Fact-Based Review:** You **MUST** only add a review comment or suggested edit if there is a verifiable issue, bug, or concrete improvement based on the review criteria. **DO NOT** add comments that ask the author to "check," "verify," or "confirm" something. **DO NOT** add comments that simply explain or validate what the code does.
6. **Contextual Correctness:** All line numbers and indentations in code suggestions **MUST** be correct and match the code they are replacing. Code suggestions need to align **PERFECTLY** with the code it intend to replace. Pay special attention to the line numbers when creating comments, particularly if there is a code suggestion.

Choose a reason for hiding this comment

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

medium

There's a minor grammatical error in this instruction. The verb 'intend' should be 'intends' to agree with its subject 'it'.

6. **Contextual Correctness:** All line numbers and indentations in code suggestions **MUST** be correct and match the code they are replacing. Code suggestions need to align **PERFECTLY** with the code it intends to replace. Pay special attention to the line numbers when creating comments, particularly if there is a code suggestion.

**Output File Path** where your final JSON output must be written:
```
!{echo $GITHUB_ENV}

Choose a reason for hiding this comment

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

medium

There's an extra space in the echo command here. While echo might handle it, it's best to remove it for correctness and consistency.

!{echo $GITHUB_ENV}

4. Use the "echo" shell command to append the CSV labels to the output file path provided above:
```
echo "SELECTED_LABELS=[APPROPRIATE_LABELS_AS_CSV]" >> "[filepath_for_env]"

Choose a reason for hiding this comment

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

medium

The example command echo "SELECTED_LABELS=[APPROPRIATE_LABELS_AS_CSV]" >> "[filepath_for_env]" is a bit ambiguous with its quoting. A clearer and safer pattern, consistent with other prompts in this PR, would be to directly reference the environment variable and ensure it's quoted. This makes the instruction for the AI more direct and less prone to misinterpretation.

    echo "SELECTED_LABELS=[APPROPRIATE_LABELS_AS_CSV]" >> "$GITHUB_ENV"

Comment on lines +24 to +29
resource "azurerm_postgresql_flexible_server_firewall_rule" "allow_azure_services" {
name = "AllowAzureServices"
server_id = azurerm_postgresql_flexible_server.postgresql.id
start_ip_address = "0.0.0.0"
end_ip_address = "0.0.0.0"
}

Choose a reason for hiding this comment

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

medium

This firewall rule allows access from all Azure services, which is a good step to limit public exposure. For even stronger security, consider using VNet integration for the Function App and a private endpoint for the PostgreSQL server. This would ensure traffic between your services is completely isolated from the public internet. This can be a future enhancement to further harden the infrastructure.

@fpittelo fpittelo merged commit 11d382b into qa Nov 28, 2025
@fpittelo fpittelo deleted the dev branch November 28, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants