diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index 63960ea..caa4bbd 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -3,7 +3,7 @@ on: pull_request: types: [opened] jobs: - security: + security-jira: if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-') || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/sast-scan.yml b/.github/workflows/sast-scan.yml new file mode 100644 index 0000000..3b9521a --- /dev/null +++ b/.github/workflows/sast-scan.yml @@ -0,0 +1,11 @@ +name: SAST Scan +on: + pull_request: + types: [opened, synchronize, reopened] +jobs: + security-sast: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Semgrep Scan + run: docker run -v /var/run/docker.sock:/var/run/docker.sock -v "${PWD}:/src" returntocorp/semgrep semgrep scan --config auto \ No newline at end of file diff --git a/.github/workflows/sca-scan.yml b/.github/workflows/sca-scan.yml index a45fd65..2296ece 100644 --- a/.github/workflows/sca-scan.yml +++ b/.github/workflows/sca-scan.yml @@ -1,9 +1,9 @@ name: Source Composition Analysis Scan on: pull_request: - types: [ opened, synchronize, reopened ] + types: [opened, synchronize, reopened] jobs: - security: + security-sca: runs-on: ubuntu-latest steps: - uses: actions/checkout@master diff --git a/changelog.md b/changelog.md index d75ea19..08a82cb 100644 --- a/changelog.md +++ b/changelog.md @@ -2,9 +2,9 @@ A brief description of what changes project contains -#### v1.0.1 +#### v1.1.0 -- added surefire plugin to generate test report +- added GCP_NA region support ## Introducing Release Of Java Marketplace SDK diff --git a/pom.xml b/pom.xml index 06a0b99..5db6b52 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ https://github.com/contentstack/contentstack-management-java/ - 1.0.0 + 1.1.0 9 9 UTF-8 @@ -19,11 +19,11 @@ 3.0.0 5.2.2 3.1.6 - 2.9.0 - 2.9.0 + 2.10.0 + 2.10.0 4.10.0 0.8.7 - 1.18.30 + 1.18.32 5.10.0 5.8.0-M1 5.10.0 @@ -117,7 +117,7 @@ org.jetbrains annotations - 24.0.1 + 24.1.0 provided diff --git a/src/main/java/com/contentstack/sdk/Region.java b/src/main/java/com/contentstack/sdk/Region.java index 80f16c8..3842f38 100644 --- a/src/main/java/com/contentstack/sdk/Region.java +++ b/src/main/java/com/contentstack/sdk/Region.java @@ -25,4 +25,8 @@ public enum Region { * Azure na region. */ AZURE_NA, + /** + * Gcp na region. + */ + GCP_NA, } diff --git a/src/test/java/com/contentstack/sdk/TestClient.java b/src/test/java/com/contentstack/sdk/TestClient.java index 760b619..f8ab55c 100644 --- a/src/test/java/com/contentstack/sdk/TestClient.java +++ b/src/test/java/com/contentstack/sdk/TestClient.java @@ -47,6 +47,14 @@ public static Marketplace getMarketplaceAzureEu() { .build(); } + public static Marketplace getMarketplaceGcpNa() { + return new Marketplace + .Builder(TestClient.ORGANIZATION_UID) + .host(HOST) + .region(Region.GCP_NA) + .build(); + } + public static Marketplace getMarketplaceWithLogin() { return new Marketplace diff --git a/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java b/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java index 9f8330d..dd1c499 100644 --- a/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java +++ b/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java @@ -36,7 +36,7 @@ void testConstructorWithNullOrganizationUidAndWithValidHost() { //String organizationUid = "nullOrganizationUid123"; String organizationUid = null; String host = "developerhub-api.contentstack.com"; - assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid) + assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid) .host(host) .build()); } @@ -63,7 +63,7 @@ void testConstructorWithNullOrganizationUid() { void testConstructorWithNullOrganizationUidNullCheck() { // Arrange String organizationUid = null; - assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid) + assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid) .build()); }