mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-21 19:44:57 +00:00
When we are trying to run an image with negative policy result from Anchore, Falco will alert us.
22 lines
499 B
Python
22 lines
499 B
Python
import os
|
|
|
|
import actions, infrastructure
|
|
|
|
|
|
def main():
|
|
anchore_client = infrastructure.AnchoreClient(
|
|
os.environ.get('ANCHORE_CLI_USER', 'admin'),
|
|
os.environ['ANCHORE_CLI_PASS'],
|
|
os.environ.get('ANCHORE_CLI_URL', 'http://localhost:8228/v1'),
|
|
os.environ.get('ANCHORE_CLI_SSL_VERIFY', True)
|
|
)
|
|
action = actions.CreateFalcoRuleFromAnchoreStopPolicyResults(anchore_client)
|
|
|
|
result = action.run()
|
|
|
|
print(result)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|