-
Notifications
You must be signed in to change notification settings - Fork 3
[teams] feat(injector): add Microsoft Teams injector (#141) #142
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: main
Are you sure you want to change the base?
Conversation
2d2bab6 to
f1dbef3
Compare
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.
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
DataHelpersclass ininjector_commonfor 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 |
teams/teams/client/teams_client.py
Outdated
| response = requests.post(url=url, json=payload) | ||
| return ExecutionResult.from_http_response(response) |
Copilot
AI
Jan 16, 2026
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.
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.
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.
Pull request overview
Copilot reviewed 12 out of 19 changed files in this pull request and generated 2 comments.
teams/teams/client/teams_client.py
Outdated
| import requests | ||
| from requests.exceptions import RequestException, Timeout | ||
|
|
||
| DEFAULT_TIMEOUT = 5 # secondes |
Copilot
AI
Jan 19, 2026
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.
The DEFAULT_TIMEOUT constant has a French comment ("secondes"). For consistency with the codebase and professional standards, this should be in English: "seconds".
| DEFAULT_TIMEOUT = 5 # secondes | |
| DEFAULT_TIMEOUT = 5 # seconds |
| from typing import Dict | ||
|
|
||
|
|
||
| class TeamsPayloadBuilder: | ||
|
|
||
| @staticmethod | ||
| def build(content: Dict) -> Dict: | ||
| return { | ||
| "title": content["title"], | ||
| "message": content["message"], | ||
| } |
Copilot
AI
Jan 19, 2026
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.
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.
fe1c0f6 to
4e5aa33
Compare
4e5aa33 to
cda9eee
Compare
cda9eee to
8131aea
Compare
| First, create a dedicated virtual environment to keep things isolated: | ||
|
|
||
| ```shell | ||
| py -3.12 -m venv venv |
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.
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 |
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.
Q: Do we still need to maintain the openbas reference? @antoinemzs
| working_directory: ~/openaev | ||
| command: | | ||
| poetry install --extras prod | ||
| INJECTORS="nuclei nmap http-query" |
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.
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?
savacano28
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.
Hi, I just added a few questions to the config.yml but it’s not blocking.





Proposed changes
Related issues