Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat: added NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN to ScanRunWarningT…
Browse files Browse the repository at this point in the history
…race.Code

fix: Added fix to return a list of the endpoints that encountered errors during crawl, along with the specific error message when the starting URL returns Http errors
fix: GoogleAccount is deprecated

PiperOrigin-RevId: 472758119

Source-Link: googleapis/googleapis@4356ba6

Source-Link: https://github.com/googleapis/googleapis-gen/commit/237042023f108b14c042711845241fbb62cf2e08
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjM3MDQyMDIzZjEwOGIxNGMwNDI3MTE4NDUyNDFmYmI2MmNmMmUwOCJ9

chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions

PiperOrigin-RevId: 472750037

Source-Link: googleapis/googleapis@88f2ea3

Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 17, 2022
1 parent 97378f1 commit 7a8f544
Show file tree
Hide file tree
Showing 500 changed files with 35,206 additions and 53,714 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.websecurityscanner.v1.stub.WebSecurityScannerStubSettings;
Expand Down Expand Up @@ -58,8 +59,11 @@
* <p>For example, to set the total timeout of createScanConfig to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* WebSecurityScannerSettings.Builder webSecurityScannerSettingsBuilder =
* WebSecurityScannerSettings.newBuilder();
* webSecurityScannerSettingsBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
* <p>Sample for WebSecurityScannerClient:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) {
* CreateScanConfigRequest request =
* CreateScanConfigRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public class HttpJsonWebSecurityScannerStub extends WebSecurityScannerStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("scanConfig", request.getScanConfig()))
.toBody("scanConfig", request.getScanConfig(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ScanConfig>newBuilder()
Expand Down Expand Up @@ -246,7 +246,7 @@ public class HttpJsonWebSecurityScannerStub extends WebSecurityScannerStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("scanConfig", request.getScanConfig()))
.toBody("scanConfig", request.getScanConfig(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ScanConfig>newBuilder()
Expand Down Expand Up @@ -283,7 +283,7 @@ public class HttpJsonWebSecurityScannerStub extends WebSecurityScannerStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearName().build()))
.toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ScanRun>newBuilder()
Expand Down Expand Up @@ -388,7 +388,7 @@ public class HttpJsonWebSecurityScannerStub extends WebSecurityScannerStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearName().build()))
.toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ScanRun>newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@
* <p>For example, to set the total timeout of createScanConfig to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* WebSecurityScannerStubSettings.Builder webSecurityScannerSettingsBuilder =
* WebSecurityScannerStubSettings.newBuilder();
* webSecurityScannerSettingsBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void createScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -201,6 +202,7 @@ public void getScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -319,6 +321,7 @@ public void updateScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build();
mockService.addResponse(expectedResponse);

Expand All @@ -335,6 +338,7 @@ public void updateScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Expand Down Expand Up @@ -378,6 +382,7 @@ public void updateScanConfigExceptionTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Expand Down Expand Up @@ -702,6 +707,7 @@ public void getFindingTest() throws Exception {
.setVulnerableHeaders(VulnerableHeaders.newBuilder().build())
.setVulnerableParameters(VulnerableParameters.newBuilder().build())
.setXss(Xss.newBuilder().build())
.setXxe(Xxe.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void createScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build();
mockWebSecurityScanner.addResponse(expectedResponse);

Expand Down Expand Up @@ -189,6 +190,7 @@ public void getScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build();
mockWebSecurityScanner.addResponse(expectedResponse);

Expand Down Expand Up @@ -292,6 +294,7 @@ public void updateScanConfigTest() throws Exception {
.setSchedule(ScanConfig.Schedule.newBuilder().build())
.setManagedScan(true)
.setStaticIpScan(true)
.setIgnoreHttpStatusErrors(true)
.build();
mockWebSecurityScanner.addResponse(expectedResponse);

Expand Down Expand Up @@ -604,6 +607,7 @@ public void getFindingTest() throws Exception {
.setVulnerableHeaders(VulnerableHeaders.newBuilder().build())
.setVulnerableParameters(VulnerableParameters.newBuilder().build())
.setXss(Xss.newBuilder().build())
.setXxe(Xxe.newBuilder().build())
.build();
mockWebSecurityScanner.addResponse(expectedResponse);

Expand Down
Loading

0 comments on commit 7a8f544

Please sign in to comment.