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

fix(arm): use correct type casting for ints in azure scan #1376

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

nikpivkin
Copy link
Collaborator

@nikpivkin nikpivkin commented Jul 9, 2023

The wrong type was used when converting the value to int.

See aquasecurity/trivy#4792

Example to reproduce the problem:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "2.0.0.0",
    "apiProfile": "2019-03-01-hybrid",
    "parameters": {},
    "variables": {},
    "functions": [],
    "resources": [
        {
            "name": "flowlogs/sample",
            "type": "Microsoft.Network/networkWatchers/flowLogs",
            "apiVersion": "2020-11-01",
            "location": "location",
            "tags": {},
            "properties": {
                "targetResourceId": "targetResourceId",
                "storageId": "storageId",
                "enabled": true,
                "retentionPolicy": {
                    "days": 2
                },
                "format": {
                    "type": "JSON"
                }
            }
        }
    ],
    "outputs": {}
}

@simar7
Copy link
Member

simar7 commented Jul 10, 2023

nice, could you add a test for it?

@simar7 simar7 merged commit 20ba844 into aquasecurity:master Jul 20, 2023
8 checks passed
@nikpivkin nikpivkin deleted the nik-int-cast branch July 20, 2023 16:10
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.

3 participants