Skip to content
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

feat: guardduty virus scanning #8121

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

scottheng96
Copy link
Contributor

Problem

Closes [insert issue #]

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible

Features:

  • Details ...

Improvements:

  • Details ...

Bug Fixes:

  • Details ...

Before & After Screenshots

BEFORE:

AFTER:

Tests

Deploy Notes

New environment variables:

  • env var : env var details

New scripts:

  • script : script details

New dependencies:

  • dependency : dependency details

New dev dependencies:

  • dependency : dependency details

@datadog-opengovsg
Copy link

Datadog Report

Branch report: feat/guardduty-virus-scanning
Commit report: fcdbcaa
Test service: formsg

❌ 4 Failed (0 Known Flaky), 314 Passed, 0 Skipped, 1m 23.13s Total Time

❌ Failed Tests (4)

  • handler should delete file and log and return 400 status with virus metadata if file is malicious - serverless/virus-scanner/src/__tests/index.spec.ts

  • handler should move file to clean bucket and log and return 200 if file is not malicious - serverless/virus-scanner/src/__tests/index.spec.ts

  • handler should return 500 error and log if file is clean but moving file to clean bucket fails - serverless/virus-scanner/src/__tests/index.spec.ts - Details

    Expand for error
     expect(received).toBe(expected) // Object.is equality
     
     Expected: "{\"message\":\"Failed to move file to clean bucket\",\"key\":\"97259c40-728f-41a3-aafa-b1f14aca378c\"}"
     Received: "{\"message\":\"Failed to get file tags\",\"err\":{\"$metadata\":{\"attempts\":1,\"totalRetryDelay\":0}},\"key\":\"97259c40-728f-41a3-aafa-b1f14aca378c\"}"
    
  • handler should return 500 error and log if virus scanning fails to complete and not delete the quarantine file - serverless/virus-scanner/src/__tests/index.spec.ts

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