Skip to content

feat: implement Azure connection CRUD endpoints - #317

Open
s225090522 wants to merge 2 commits into
mainfrom
feat/azure-connection-endpoints
Open

feat: implement Azure connection CRUD endpoints#317
s225090522 wants to merge 2 commits into
mainfrom
feat/azure-connection-endpoints

Conversation

@s225090522

Copy link
Copy Markdown

Summary

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code cleanup
  • Documentation
  • CI/CD / infrastructure
  • Security

Affected Components

  • /backend-api
  • /frontend
  • /engine (collectors / policies)
  • /security
  • /infrastructure
  • /.github/workflows
  • /docs

Motivation

Testing Done

  • Unit tests pass locally
  • Tested manually — describe how:
  • No tests required — explain why:

Security Considerations

Breaking Changes

  • No breaking changes
  • Yes — describe below:

Rollback Plan

  • Revert commit is sufficient
  • Requires additional steps — describe below:

Checklist

  • Code follows project conventions
  • No secrets, credentials, or tokens committed
  • Relevant documentation updated (if applicable)
  • CI/CD workflows pass on this branch
  • PR is focused on one thing

Screenshots

@s225090522
s225090522 requested a review from a team as a code owner August 9, 2026 02:53
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Preview Environment

A preview environment can be spun up on demand for this PR.

Action Label Includes
Spin up preview deploy-preview Frontend, backend, database, Redis, OPA, worker
Spin up preview with M365 deploy-preview-m365 Everything above + PowerShell service for Exchange/Teams scan testing
Tear down preview teardown-preview Stops the environment early

The environment will also be torn down automatically when the PR is closed or merged.
Preview URLs will appear in a follow-up comment once the deploy completes (~5–8 min).
M365 scans require real tenant credentials added through the frontend UI.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 941c46ee14

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread backend-api/app/api/v1/router.py Outdated
from fastapi import APIRouter
from app.api.v1 import (
auth,
aws_connections,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the nonexistent AWS router import

Importing app.api.v1.router now requires app.api.v1.aws_connections, but this commit does not add backend-api/app/api/v1/aws_connections.py and the repo has no such module. In any environment that starts the FastAPI app through this router, startup fails with an import error before the new Azure routes or any existing routes can be registered.

Useful? React with 👍 / 👎.


# revision identifiers, used by Alembic.
revision: str = "l1m2n3o4p567"
down_revision: Union[str, Sequence[str], None] = "k1l2m3n4o567"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Point the migration at an existing revision

This down_revision references k1l2m3n4o567, but there is no revision with that ID in backend-api/alembic/versions or in this commit's tree; the existing chain currently reaches d87c3bb49953. Alembic cannot build the migration graph or run upgrades when a migration depends on a missing revision, so databases cannot apply the Azure connection schema change.

Useful? React with 👍 / 👎.

Comment thread backend-api/app/models/user.py Outdated
Comment on lines +79 to +80
aws_connections: Mapped[list["AWSConnection"]] = relationship(
back_populates="user"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the matching AWSConnection side before back-populating

This relationship declares back_populates="user", but AWSConnection is still the id-only stub and has no user relationship or user_id foreign key. Once SQLAlchemy configures mappers after importing the models, the unmatched back_populates raises an invalid mapper configuration error, breaking unrelated user/database paths until AWSConnection is implemented or this relationship is removed.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

CI: Backend API

Job Result
Security analysis (CodeQL + Bandit) failure
Lint success

One or more checks failed. View logs

@s225090522

s225090522 commented Aug 9, 2026

Copy link
Copy Markdown
Author

Fixed: removed aws_connections router import , updated migration down_revision to chain from j2k3l4m5n678, removed unmatched aws_connections back_populates from user.py. The Bandit high severity issue in evidence.py:180 is pre-existing and not introduced by this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant