Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM art-hq.intranet.qualys.com:5006/secure/distroless/debian12/zing/java-nonroot:24.08.300.0-2-jre17.0.13.0.101

USER root

WORKDIR /home/app
ADD --chown=app:app ./target/github-was-action.jar /home/app/GitHubActionsQWas-0.0.1-SNAPSHOT.jar
ADD --chown=app:app ./run_service.sh /home/app/run_service.sh

RUN /busybox/mkdir -p /home/app/outputs

VOLUME /home/app/outputs

RUN ["/busybox/chmod", "775", "/home/app/run_service.sh"]

RUN ["/busybox/chmod", "-R", "777", "/home/app/outputs"]

RUN chmod ugo+rwx $JAVA_HOME/lib/security/cacerts

#HEALTHCHECK CMD curl --fail localhost:8081/actuator/health || exit 1
USER app
ENTRYPOINT ["/busybox/sh", "/home/app/run_service.sh"]
18 changes: 18 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@Library("jenkins-libraries-v2@master")
import com.qualys.pipeline.*

def templateName = "generic-docker-template"
def branch = "master"
def nodeLabel = "slave"

pipeline = loadPipelineTemplate(templateName, branch, nodeLabel)

def customPreHookStep = {sh "sed -i 's/<release.number>RELEASE<\\/release.number>/<release.number>${BUILD_ID}<\\/release.number>/g' ${WORKSPACE}/pom.xml"}

HooksHelper hook = new HooksHelper()
hook.addPreHook(StageName.BUILD, customPreHookStep)

// use when hook is enabled
pipeline.runPipeline("properties.yaml", nodeLabel, hook)

//pipeline.runPipeline("properties.yaml", nodeLabel)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Swapnil Ramesh Adhav

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ jobs:
uses: Qualys/github-action-qwas@main
id: was
with:
API_SERVER: ${{ vars.API_SERVER }}
PLATFORM: ${{ vars.PLATFORM }}
AUTH_TYPE: ${{ vars.AUTH_TYPE }}
QUALYS_USERNAME: ${{ vars.QUALYS_USERNAME }}
QUALYS_PASSWORD: ${{ secrets.QUALYS_PASSWORD }}
CLIENT_ID: ${{ vars.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
WEBAPP_ID: ${{ vars.WEBAPP_ID }}
SCAN_NAME: ${{ vars.SCAN_NAME }}
SCAN_TYPE: ${{ vars.SCAN_TYPE }}
Expand Down Expand Up @@ -111,9 +114,12 @@ jobs:
uses: Qualys/github-action-qwas@main
id: was
with:
API_SERVER: ${{ vars.API_SERVER }}
PLATFORM: ${{ vars.PLATFORM }}
AUTH_TYPE: ${{ vars.AUTH_TYPE }}
QUALYS_USERNAME: ${{ vars.QUALYS_USERNAME }}
QUALYS_PASSWORD: ${{ secrets.QUALYS_PASSWORD }}
CLIENT_ID: ${{ vars.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
WEBAPP_ID: ${{ vars.WEBAPP_ID }}
SCAN_NAME: ${{ vars.SCAN_NAME }}
SCAN_TYPE: ${{ vars.SCAN_TYPE }}
Expand Down Expand Up @@ -169,9 +175,12 @@ jobs:
uses: Qualys/github-action-qwas@main
id: was
with:
API_SERVER: ${{ vars.API_SERVER }}
PLATFORM: ${{ vars.PLATFORM }}
AUTH_TYPE: ${{ vars.AUTH_TYPE }}
QUALYS_USERNAME: ${{ vars.QUALYS_USERNAME }}
QUALYS_PASSWORD: ${{ secrets.QUALYS_PASSWORD }}
CLIENT_ID: ${{ vars.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
WEBAPP_ID: ${{ vars.WEBAPP_ID }}
SCAN_NAME: ${{ vars.SCAN_NAME }}
SCAN_TYPE: ${{ vars.SCAN_TYPE }}
Expand Down Expand Up @@ -229,9 +238,12 @@ jobs:
uses: Qualys/github-action-qwas@main
id: was
with:
API_SERVER: ${{ vars.API_SERVER }}
PLATFORM: ${{ vars.PLATFORM }}
AUTH_TYPE: ${{ vars.AUTH_TYPE }}
QUALYS_USERNAME: ${{ vars.QUALYS_USERNAME }}
QUALYS_PASSWORD: ${{ secrets.QUALYS_PASSWORD }}
CLIENT_ID: ${{ vars.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
WEBAPP_ID: ${{ vars.WEBAPP_ID }}
SCAN_NAME: ${{ vars.SCAN_NAME }}
SCAN_TYPE: ${{ vars.SCAN_TYPE }}
Expand Down Expand Up @@ -278,9 +290,12 @@ If repository is private, then add PAT (personal access token) token in the chec

| Parameter | Description | Mandatory/ Optional | Default Value | Parameter Type |
|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|---------------|----------------|
| QUALYS_PASSWORD | Use the Qualys Password | Mandatory | "" | Secret |
| QUALYS_USERNAME | Use the Qualys Username | Mandatory | "" | Variable |
| API_SERVER | Use the API URL. [Click here](https://www.qualys.com/platform-identification/) to get your API URL. (Make sure that you provide API server URL only. Platform URL or API Gateway URL is not valid) | Mandatory | "" | Variable |
| PLATFORM | This parameter specifies the qualys platform. | Mandatory | "" | Variable |
| AUTH_TYPE | This parameter specifies the authentication type. BASIC and OAUTH are supported | Mandatory | "" | Variable |
| QUALYS_PASSWORD | Use the Qualys Password will be used in BASIC authentication. | Mandatory for BASIC | "" | Secret |
| QUALYS_USERNAME | Use the Qualys Username will be used in BASIC authentication. | Mandatory for BASIC | "" | Variable |
| CLIENT_ID | This parameter specifies the client id will be used in OAUTH authentication. | Mandatory for OAUTH | "" | Variable |
| CLIENT_SECRET | This parameter specifies the client secret will be used in OAUTH authentication. | Mandatory for OAUTH | "" | Secret |
| WEBAPP_ID | Use the Web App ID that you want to scan. | Mandatory | "" | Variable |
| SCAN_NAME | Use any name for the scan. The timestamp gets appended automatically. | Mandatory | "" | Variable |
| SCAN_TYPE | This parameter specifies the scan type. Use VULNERABILITY or DISCOVERY as a parameter value. | Mandatory | "" | Variable |
Expand Down
Loading