SAFEBROWSING

safebrowsing.encodedFullHashes.get

valid {
    input.ReqMap.encodedRequest == STRING
    input.Qs.clientId == STRING
    input.Qs.clientVersion == STRING
    input.ProviderMetadata.Region == STRING
}

safebrowsing.encodedUpdates.get

valid {
    input.ReqMap.encodedRequest == STRING
    input.Qs.clientId == STRING
    input.Qs.clientVersion == STRING
    input.ProviderMetadata.Region == STRING
}

safebrowsing.fullHashes.find

enum_GoogleSecuritySafebrowsingV4ThreatInfoPlatformTypes := [ "PLATFORM_TYPE_UNSPECIFIED", "WINDOWS", "LINUX", "ANDROID", "OSX", "IOS", "ANY_PLATFORM", "ALL_PLATFORMS", "CHROME" ]
enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatEntryTypes := [ "THREAT_ENTRY_TYPE_UNSPECIFIED", "URL", "EXECUTABLE", "IP_RANGE", "CHROME_EXTENSION", "FILENAME", "CERT" ]
enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatTypes := [ "THREAT_TYPE_UNSPECIFIED", "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", "SOCIAL_ENGINEERING_INTERNAL", "API_ABUSE", "MALICIOUS_BINARY", "CSD_WHITELIST", "CSD_DOWNLOAD_WHITELIST", "CLIENT_INCIDENT", "CLIENT_INCIDENT_WHITELIST", "APK_MALWARE_OFFLINE", "SUBRESOURCE_FILTER", "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", "ACCURACY_TIPS" ]

valid {
    input.Body.apiClient.clientId == STRING
    input.Body.apiClient.clientVersion == STRING
    input.Body.client.clientId == STRING
    input.Body.client.clientVersion == STRING
    input.Body.clientStates[_] == STRING
    input.Body.threatInfo.platformTypes[_] == enum_GoogleSecuritySafebrowsingV4ThreatInfoPlatformTypes[_]
    input.Body.threatInfo.threatEntries[_].digest == STRING
    input.Body.threatInfo.threatEntries[_].hash == STRING
    input.Body.threatInfo.threatEntries[_].url == STRING
    input.Body.threatInfo.threatEntryTypes[_] == enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatEntryTypes[_]
    input.Body.threatInfo.threatTypes[_] == enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatTypes[_]
    input.ProviderMetadata.Region == STRING
}

safebrowsing.hashes.search

valid {
    input.Qs.hashPrefixes == STRING
    input.ProviderMetadata.Region == STRING
}

safebrowsing.threatHits.create

enum_GoogleSecuritySafebrowsingV4ThreatHitPlatformType := [ "PLATFORM_TYPE_UNSPECIFIED", "WINDOWS", "LINUX", "ANDROID", "OSX", "IOS", "ANY_PLATFORM", "ALL_PLATFORMS", "CHROME" ]
enum_GoogleSecuritySafebrowsingV4ThreatHitThreatSourceType := [ "THREAT_SOURCE_TYPE_UNSPECIFIED", "MATCHING_URL", "TAB_URL", "TAB_REDIRECT", "TAB_RESOURCE" ]
enum_GoogleSecuritySafebrowsingV4ThreatHitThreatType := [ "THREAT_TYPE_UNSPECIFIED", "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", "SOCIAL_ENGINEERING_INTERNAL", "API_ABUSE", "MALICIOUS_BINARY", "CSD_WHITELIST", "CSD_DOWNLOAD_WHITELIST", "CLIENT_INCIDENT", "CLIENT_INCIDENT_WHITELIST", "APK_MALWARE_OFFLINE", "SUBRESOURCE_FILTER", "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", "ACCURACY_TIPS" ]

valid {
    input.Body.clientInfo.clientId == STRING
    input.Body.clientInfo.clientVersion == STRING
    input.Body.entry.digest == STRING
    input.Body.entry.hash == STRING
    input.Body.entry.url == STRING
    input.Body.platformType == enum_GoogleSecuritySafebrowsingV4ThreatHitPlatformType[_]
    input.Body.resources[_].referrer == STRING
    input.Body.resources[_].remoteIp == STRING
    input.Body.resources[_].type == enum_GoogleSecuritySafebrowsingV4ThreatHitThreatSourceType[_]
    input.Body.resources[_].url == STRING
    input.Body.threatType == enum_GoogleSecuritySafebrowsingV4ThreatHitThreatType[_]
    input.Body.userInfo.regionCode == STRING
    input.Body.userInfo.userId == STRING
    input.ProviderMetadata.Region == STRING
}

safebrowsing.threatListUpdates.fetch

enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraintsSupportedCompressions := [ "COMPRESSION_TYPE_UNSPECIFIED", "RAW", "RICE" ]
enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestPlatformType := [ "PLATFORM_TYPE_UNSPECIFIED", "WINDOWS", "LINUX", "ANDROID", "OSX", "IOS", "ANY_PLATFORM", "ALL_PLATFORMS", "CHROME" ]
enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestThreatEntryType := [ "THREAT_ENTRY_TYPE_UNSPECIFIED", "URL", "EXECUTABLE", "IP_RANGE", "CHROME_EXTENSION", "FILENAME", "CERT" ]
enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestThreatType := [ "THREAT_TYPE_UNSPECIFIED", "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", "SOCIAL_ENGINEERING_INTERNAL", "API_ABUSE", "MALICIOUS_BINARY", "CSD_WHITELIST", "CSD_DOWNLOAD_WHITELIST", "CLIENT_INCIDENT", "CLIENT_INCIDENT_WHITELIST", "APK_MALWARE_OFFLINE", "SUBRESOURCE_FILTER", "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", "ACCURACY_TIPS" ]

valid {
    input.Body.client.clientId == STRING
    input.Body.client.clientVersion == STRING
    input.Body.listUpdateRequests[_].constraints.deviceLocation == STRING
    input.Body.listUpdateRequests[_].constraints.language == STRING
    input.Body.listUpdateRequests[_].constraints.maxDatabaseEntries == INTEGER
    input.Body.listUpdateRequests[_].constraints.maxUpdateEntries == INTEGER
    input.Body.listUpdateRequests[_].constraints.region == STRING
    input.Body.listUpdateRequests[_].constraints.supportedCompressions[_] == enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraintsSupportedCompressions[_]
    input.Body.listUpdateRequests[_].platformType == enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestPlatformType[_]
    input.Body.listUpdateRequests[_].state == STRING
    input.Body.listUpdateRequests[_].threatEntryType == enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestThreatEntryType[_]
    input.Body.listUpdateRequests[_].threatType == enum_GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestThreatType[_]
    input.ProviderMetadata.Region == STRING
}

safebrowsing.threatLists.list

valid {
    input.ProviderMetadata.Region == STRING
}

safebrowsing.threatMatches.find

enum_GoogleSecuritySafebrowsingV4ThreatInfoPlatformTypes := [ "PLATFORM_TYPE_UNSPECIFIED", "WINDOWS", "LINUX", "ANDROID", "OSX", "IOS", "ANY_PLATFORM", "ALL_PLATFORMS", "CHROME" ]
enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatEntryTypes := [ "THREAT_ENTRY_TYPE_UNSPECIFIED", "URL", "EXECUTABLE", "IP_RANGE", "CHROME_EXTENSION", "FILENAME", "CERT" ]
enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatTypes := [ "THREAT_TYPE_UNSPECIFIED", "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION", "SOCIAL_ENGINEERING_INTERNAL", "API_ABUSE", "MALICIOUS_BINARY", "CSD_WHITELIST", "CSD_DOWNLOAD_WHITELIST", "CLIENT_INCIDENT", "CLIENT_INCIDENT_WHITELIST", "APK_MALWARE_OFFLINE", "SUBRESOURCE_FILTER", "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", "ACCURACY_TIPS" ]

valid {
    input.Body.client.clientId == STRING
    input.Body.client.clientVersion == STRING
    input.Body.threatInfo.platformTypes[_] == enum_GoogleSecuritySafebrowsingV4ThreatInfoPlatformTypes[_]
    input.Body.threatInfo.threatEntries[_].digest == STRING
    input.Body.threatInfo.threatEntries[_].hash == STRING
    input.Body.threatInfo.threatEntries[_].url == STRING
    input.Body.threatInfo.threatEntryTypes[_] == enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatEntryTypes[_]
    input.Body.threatInfo.threatTypes[_] == enum_GoogleSecuritySafebrowsingV4ThreatInfoThreatTypes[_]
    input.ProviderMetadata.Region == STRING
}