Skip to content

Commit

Permalink
use List.of
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiodallapiazza committed Sep 17, 2024
1 parent ab7a9bf commit 80afb76
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
package org.zaproxy.zap.extension.ascanrules;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -51,14 +50,14 @@ public class CloudMetadataScanRule extends AbstractHostPlugin implements CommonA

private enum CloudProvider {
AWS(
Arrays.asList(
List.of(
new Endpoint(
"169.254.169.254", "/latest/meta-data/", Collections.emptyMap()),
new Endpoint(
"aws.zaproxy.org", "/latest/meta-data/", Collections.emptyMap())),
Set.of("ami-id", "instance-id", "local-hostname", "public-hostname")),
GCP(
Arrays.asList(
List.of(
new Endpoint(
"169.254.169.254",
"/computeMetadata/v1/",
Expand All @@ -69,7 +68,7 @@ private enum CloudProvider {
Map.of("Metadata-Flavor", "Google"))),
Set.of("project-id", "zone", "machineType", "hostname")),
OCI(
Arrays.asList(
List.of(
new Endpoint(
"169.254.169.254", "/opc/v1/instance/", Collections.emptyMap()),
new Endpoint(
Expand All @@ -78,7 +77,7 @@ private enum CloudProvider {
Collections.emptyMap())),
Set.of("oci", "instance", "availabilityDomain", "region")),
AlibabaCloud(
Arrays.asList(
List.of(
new Endpoint(
"100.100.100.200", "/latest/meta-data/", Collections.emptyMap()),
new Endpoint(
Expand All @@ -87,7 +86,7 @@ private enum CloudProvider {
Collections.emptyMap())),
Set.of("image-id", "instance-id", "hostname", "region-id")),
Azure(
Arrays.asList(
List.of(
new Endpoint(
"169.254.169.254",
"/metadata/instance",
Expand Down

0 comments on commit 80afb76

Please sign in to comment.