Skip to content

Conversation

@RomuDeuxfois
Copy link
Member

Proposed changes

  • Add Microsoft Teams injector

Related issues

Copy link

Copilot AI left a comment

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 adds a Microsoft Teams injector to the OpenAEV platform, enabling notifications to Teams channels via Power Automate HTTP webhooks. The implementation follows existing injector patterns (nuclei, nmap, http-query) and introduces shared helper code in injector_common.

Changes:

  • New Teams injector with client, contracts, helpers, and main entry point
  • Shared DataHelpers class in injector_common for data extraction (used by Teams, can benefit others)
  • Docker/deployment configuration and comprehensive documentation

Reviewed changes

Copilot reviewed 12 out of 19 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
teams/teams/openaev_teams.py Main entry point with message processing and execution logic
teams/teams/client/teams_client.py HTTP client for sending Teams notifications
teams/teams/helpers/teams_helper.py Payload builder for Teams messages
teams/teams/contracts_teams.py Contract definitions for Teams integration
injector_common/injector_common/data_helpers.py Shared data extraction helpers (new file)
teams/pyproject.toml Python dependencies and project configuration
teams/Dockerfile Multi-stage Docker build configuration
teams/docker-compose.yml Docker deployment configuration
teams/README.md Comprehensive documentation including Power Automate setup

Comment on lines 36 to 37
response = requests.post(url=url, json=payload)
return ExecutionResult.from_http_response(response)
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

HTTP errors (4xx, 5xx) with response bodies are not captured. The from_http_response only checks status codes but doesn't extract error details from response.text. This makes debugging failed webhook calls difficult. Consider including response body in error messages for non-2xx responses.

Copilot generated this review using guidance from repository custom instructions.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 19 changed files in this pull request and generated 2 comments.

import requests
from requests.exceptions import RequestException, Timeout

DEFAULT_TIMEOUT = 5 # secondes
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

The DEFAULT_TIMEOUT constant has a French comment ("secondes"). For consistency with the codebase and professional standards, this should be in English: "seconds".

Suggested change
DEFAULT_TIMEOUT = 5 # secondes
DEFAULT_TIMEOUT = 5 # seconds

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +11
from typing import Dict


class TeamsPayloadBuilder:

@staticmethod
def build(content: Dict) -> Dict:
return {
"title": content["title"],
"message": content["message"],
}
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

The Teams injector is missing test coverage. According to the repository guidelines, each injector should have its own test suite. The http-query injector has tests for its helpers, and other injectors (nuclei, nmap) have tests. Consider adding unit tests for TeamsPayloadBuilder.build(), TeamsClient.post_message(), and the DataHelpers methods to maintain consistency with the repository's testing practices.

Copilot uses AI. Check for mistakes.
@RomuDeuxfois RomuDeuxfois force-pushed the issue/141 branch 2 times, most recently from fe1c0f6 to 4e5aa33 Compare January 19, 2026 19:18
@savacano28 savacano28 self-requested a review January 26, 2026 09:40
@RomuDeuxfois RomuDeuxfois marked this pull request as draft January 27, 2026 14:41
@RomuDeuxfois RomuDeuxfois marked this pull request as ready for review January 28, 2026 12:31
@savacano28
Copy link
Contributor

savacano28 commented Jan 29, 2026

Tests:

  • Register injector
  • Creation Inject with contract
  • Execution: Error rabbitmq (not related to code)
Screenshot 2026-01-27 152433 Screenshot 2026-01-27 152543 Screenshot 2026-01-27 152828
  • Send inject contract teams:
image image

Base automatically changed from release/current to main February 2, 2026 13:37
First, create a dedicated virtual environment to keep things isolated:

```shell
py -3.12 -m venv venv
Copy link
Contributor

Choose a reason for hiding this comment

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

Normally, Poetry creates a virtual environment automatically, so this step shouldn’t be necessary.

docker push openaev/injector-nuclei:latest
docker push openbas/injector-nuclei:latest
for injector in $INJECTORS; do
docker tag openaev/injector-$injector:${IMAGETAG} openaev/injector-$injector:latest
Copy link
Contributor

@savacano28 savacano28 Feb 9, 2026

Choose a reason for hiding this comment

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

Q: Do we still need to maintain the openbas reference? @antoinemzs

working_directory: ~/openaev
command: |
poetry install --extras prod
INJECTORS="nuclei nmap http-query"
Copy link
Contributor

@savacano28 savacano28 Feb 9, 2026

Choose a reason for hiding this comment

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

S: I have also added some tests in injector_common, maybe you could include it? and maybe you could add some tests to this new injector?

Copy link
Contributor

@savacano28 savacano28 left a comment

Choose a reason for hiding this comment

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

Hi, I just added a few questions to the config.yml but it’s not blocking.

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.

Add injector: Microsoft Teams

2 participants