-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add agentless CSPM AWS findings assertion in serverless mode #1664
Conversation
This pull request does not have a backport label. Could you fix it @amirbenun? 🙏
|
deploy/test-environments/fleet_api/src/install_agentless_integrations.py
Outdated
Show resolved
Hide resolved
deploy/test-environments/fleet_api/src/install_agentless_integrations.py
Outdated
Show resolved
Hide resolved
deploy/test-environments/fleet_api/src/install_agentless_integrations.py
Outdated
Show resolved
Hide resolved
logger.info(f"Create {NAME} integration for policy {AGENT_POLICY_ID}") | ||
package_policy = generate_package_policy(cspm_template, integration_data) | ||
|
||
logger.info(f"Created {package_policy}") | ||
|
||
create_cspm_integration( | ||
cfg=cnfg.elk_config, | ||
pkg_policy=package_policy, | ||
agent_policy_id=AGENT_POLICY_ID, | ||
cspm_data={}, | ||
) | ||
logger.info(f"Installation of {NAME} integration is done") |
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.
create-environment
workflow supports different elastic versions installation, and the main branch is always used for deployment. To prevent some misconfigurations, such as policy field discrepancies, and ensure integration availability, logic based on the package version has been implemented for each integration. It might be better to retrieve the current package version and prevent the installation of integrations if the version is less than required.
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.
With serverless it is a bit different, you will always deploy the latest elastic stack so this check is redundant.
deploy/test-environments/fleet_api/src/install_agentless_integrations.py
Outdated
Show resolved
Hide resolved
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.
@amirbenun great work, LGTM.
Could you please verify that running the regular workflow (not agentless) is also functioning correctly?
Summary of your changes
Our sanity tests has already a serverless mode.
On this PR, the sanity tests install CSPM AWS integration on the agentless policy and verify it produces findings.
Screenshot/Data
Related Issues
Checklist
Introducing a new rule?