Skip to content

DECO-2251 Encrypted files in VaaS#974

Open
jbg-1 wants to merge 1 commit into
mainfrom
cs/is_encrypted
Open

DECO-2251 Encrypted files in VaaS#974
jbg-1 wants to merge 1 commit into
mainfrom
cs/is_encrypted

Conversation

@jbg-1
Copy link
Copy Markdown
Contributor

@jbg-1 jbg-1 commented Jun 2, 2026

Implement IsEncrypted for C# SDK

Copy link
Copy Markdown
Collaborator

@GermanCoding GermanCoding left a comment

Choose a reason for hiding this comment

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

Two nits, otherwise OK

Comment thread dotnet/Vaas/test/Vaas.Test/VaasTest.cs Outdated
Comment on lines +192 to +202
[Fact]
public void Reports_DeserializeIsEncryptedFromApiPayload()
{
const string fileReportJson =
"""
{"sha256":"c0621519a2dd9336b12dc6caef2cc789f23eef3026916638dcd620d0ac193881","verdict":"Clean","isEncrypted":true}
""";
const string urlReportJson =
"""
{"sha256":"79fae1ed9ff540bc286f6cc79c7fbaef323987d17e182ee20f13b0285038d8ed","verdict":"Malicious","url":"https://samples.develop.vaas.gdatasecurity.de/with-and-without-password.zip","isEncrypted":true}
""";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be refactored to use a theory with two tests I think

Comment thread dotnet/Vaas/test/Vaas.Test/VaasTest.cs
Implement IsEncrypted for C# SDK
}

[Fact]
public async Task ForFileAsync_IfContainsEicarAndEncryptedArchive_ReturnsMaliciousAndIsEncrypted()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why no part of Theory?

public class FileReportTest
{
[Fact]
public void Deserialize_ReturnsIsEncrypted()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not check all values?

public class UrlReportTest
{
[Fact]
public void Deserialize_ReturnsIsEncrypted()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not check all values?

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.

4 participants