diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..bd13ef1 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 0000000..80d02cf Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index 4ab282f..67b87d7 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -16,7 +16,7 @@ Briefly describe the problem you are having in a few paragraphs. ## What happened instead? -## Output of run with `POSTEE_DEBUG=true`: +## Output of run with `HOOKER_DEBUG=true`: ``` (paste your output here) diff --git a/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md index 8b4d081..dc9c298 100644 --- a/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md +++ b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md @@ -1,7 +1,7 @@ --- name: Support Question labels: triage/support -about: If you have a question about Postee. +about: If you have a question about Hooker. ---

Insight Details:

-

Insight ID: aqua-3006

+

Insight ID: khulnasoft-3006

Description: Workloads or images containing login data

Impact: Attackers with access to this workload or image might be able to use the login data to gain initial access to other resources

Severity: medium

diff --git a/regoservice/testdata/goldens/servicenow.golden b/regoservice/testdata/goldens/servicenow.golden index fc87bca..0944c5a 100644 --- a/regoservice/testdata/goldens/servicenow.golden +++ b/regoservice/testdata/goldens/servicenow.golden @@ -1,6 +1,6 @@

Name: all-in-one:3.5.19223

-

Registry: Aqua

+

Registry: Khulnasoft

Malware found: Yes

Sensitive data found: Yes

diff --git a/regoservice/testdata/goldens/trivy-operator-slack.golden b/regoservice/testdata/goldens/trivy-operator-slack.golden deleted file mode 100644 index f99d4bb..0000000 --- a/regoservice/testdata/goldens/trivy-operator-slack.golden +++ /dev/null @@ -1 +0,0 @@ -[{"text":{"text":"Vulnerability issue with image:library/nginx:1.16 in namespace default","type":"plain_text"},"type":"header"},{"type":"divider"},{"elements":[{"text":"*Summary totals:*","type":"mrkdwn"}],"type":"context"},{"elements":[{"text":"Critical: *2*","type":"mrkdwn"},{"text":"High: *0*","type":"mrkdwn"},{"text":"Medium: *0*","type":"mrkdwn"},{"text":"Low: *0*","type":"mrkdwn"},{"text":"Unknown: *0*","type":"mrkdwn"}],"type":"context"},{"type":"divider"},{"text":{"text":"*CRITICAL severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.aquasec.com/nvd/cve-2019-20367|CVE-2019-20367\u003e","type":"mrkdwn"},{"text":"libbsd0 / 0.9.1-2 / 0.9.1-2+deb10u1","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*HIGH severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.aquasec.com/nvd/cve-2018-25009|CVE-2018-25009\u003e","type":"mrkdwn"},{"text":"libwebp6 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*MEDIUM severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.aquasec.com/nvd/cve-2018-25009|CVE-2018-25010\u003e","type":"mrkdwn"},{"text":"libwebp3 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*LOW severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.aquasec.com/nvd/cve-2018-25009|CVE-2018-25011\u003e","type":"mrkdwn"},{"text":"libwebp4 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*UNKNOWN severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.aquasec.com/nvd/cve-2018-25009|CVE-2018-25012\u003e","type":"mrkdwn"},{"text":"libwebp5 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"}] \ No newline at end of file diff --git a/regoservice/testdata/goldens/trivy-jira.golden b/regoservice/testdata/goldens/tunnel-jira.golden similarity index 77% rename from regoservice/testdata/goldens/trivy-jira.golden rename to regoservice/testdata/goldens/tunnel-jira.golden index 8bcd000..a57fd3a 100644 --- a/regoservice/testdata/goldens/trivy-jira.golden +++ b/regoservice/testdata/goldens/tunnel-jira.golden @@ -5,8 +5,8 @@ h4. Critical severity vulnerabilities | || Layer || Title || Vulnerability ID || Resource name || Path || Installed version || Fix version || Url -| | pom.xml | log4j: deserialization of untrusted data in SocketServer | CVE-2019-17571 | log4j:log4j | none | 1.2.17 | 2.0-alpha1 | https://avd.aquasec.com/nvd/cve-2019-17571 -| | pom.xml | log4j: SQL injection in Log4j 1.x when application is configured to use JDBCAppender | CVE-2022-23305 | log4j:log4j | none | 1.2.17 | none | https://avd.aquasec.com/nvd/cve-2022-23305 +| | pom.xml | log4j: deserialization of untrusted data in SocketServer | CVE-2019-17571 | log4j:log4j | none | 1.2.17 | 2.0-alpha1 | https://avd.khulnasoft.com/nvd/cve-2019-17571 +| | pom.xml | log4j: SQL injection in Log4j 1.x when application is configured to use JDBCAppender | CVE-2022-23305 | log4j:log4j | none | 1.2.17 | none | https://avd.khulnasoft.com/nvd/cve-2022-23305 @@ -14,8 +14,8 @@ h4. High severity vulnerabilities | || Layer || Title || Vulnerability ID || Resource name || Path || Installed version || Fix version || Url -| | pom.xml | Remote code execution in Log4j 1.x when application is configured to use JMSAppender | CVE-2021-4104 | log4j:log4j | none | 1.2.17 | none | https://avd.aquasec.com/nvd/cve-2021-4104 -| | pom.xml | log4j: Unsafe deserialization flaw in Chainsaw log viewer | CVE-2022-23307 | log4j:log4j | none | 1.2.17 | none | https://avd.aquasec.com/nvd/cve-2022-23307 +| | pom.xml | Remote code execution in Log4j 1.x when application is configured to use JMSAppender | CVE-2021-4104 | log4j:log4j | none | 1.2.17 | none | https://avd.khulnasoft.com/nvd/cve-2021-4104 +| | pom.xml | log4j: Unsafe deserialization flaw in Chainsaw log viewer | CVE-2022-23307 | log4j:log4j | none | 1.2.17 | none | https://avd.khulnasoft.com/nvd/cve-2022-23307 @@ -23,7 +23,7 @@ h4. Medium severity vulnerabilities | || Layer || Title || Vulnerability ID || Resource name || Path || Installed version || Fix version || Url -| | pom.xml | log4j: Remote code execution in Log4j 1.x when application is configured to use JMSSink | CVE-2022-23302 | log4j:log4j | none | 1.2.17 | none | https://avd.aquasec.com/nvd/cve-2022-23302 +| | pom.xml | log4j: Remote code execution in Log4j 1.x when application is configured to use JMSSink | CVE-2022-23302 | log4j:log4j | none | 1.2.17 | none | https://avd.khulnasoft.com/nvd/cve-2022-23302 @@ -31,7 +31,7 @@ h4. Low severity vulnerabilities | || Layer || Title || Vulnerability ID || Resource name || Path || Installed version || Fix version || Url -| | pom.xml | log4j: improper validation of certificate with host mismatch in SMTP appender | CVE-2020-9488 | log4j:log4j | none | 1.2.17 | 2.12.3, 2.13.2 | https://avd.aquasec.com/nvd/cve-2020-9488 +| | pom.xml | log4j: improper validation of certificate with host mismatch in SMTP appender | CVE-2020-9488 | log4j:log4j | none | 1.2.17 | 2.12.3, 2.13.2 | https://avd.khulnasoft.com/nvd/cve-2020-9488 @@ -39,6 +39,6 @@ h4. Unknown severity vulnerabilities | || Layer || Title || Vulnerability ID || Resource name || Path || Installed version || Fix version || Url -| | pom.xml | DoS via hashmap logging | CVE-2023-26464 | log4j:log4j | none | 1.2.17 | 2.0 | https://avd.aquasec.com/nvd/cve-2023-26464 +| | pom.xml | DoS via hashmap logging | CVE-2023-26464 | log4j:log4j | none | 1.2.17 | 2.0 | https://avd.khulnasoft.com/nvd/cve-2023-26464 diff --git a/regoservice/testdata/goldens/trivy-operator-jira.golden b/regoservice/testdata/goldens/tunnel-operator-jira.golden similarity index 75% rename from regoservice/testdata/goldens/trivy-operator-jira.golden rename to regoservice/testdata/goldens/tunnel-operator-jira.golden index bf7dc3f..73aad66 100644 --- a/regoservice/testdata/goldens/trivy-operator-jira.golden +++ b/regoservice/testdata/goldens/tunnel-operator-jira.golden @@ -9,7 +9,7 @@ h4. Critical severity vulnerabilities || ID || Title || Resource || Installed version || Fixed version || Url || -| CVE-2019-20367 | | libbsd0 | 0.9.1-2 | 0.9.1-2+deb10u1 | https://avd.aquasec.com/nvd/cve-2019-20367 | +| CVE-2019-20367 | | libbsd0 | 0.9.1-2 | 0.9.1-2+deb10u1 | https://avd.khulnasoft.com/nvd/cve-2019-20367 | @@ -17,7 +17,7 @@ h4. High severity vulnerabilities || ID || Title || Resource || Installed version || Fixed version || Url || -| CVE-2018-25009 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp6 | 0.6.1-2 | | https://avd.aquasec.com/nvd/cve-2018-25009 | +| CVE-2018-25009 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp6 | 0.6.1-2 | | https://avd.khulnasoft.com/nvd/cve-2018-25009 | @@ -25,7 +25,7 @@ h4. Medium severity vulnerabilities || ID || Title || Resource || Installed version || Fixed version || Url || -| CVE-2018-25010 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp3 | 0.6.1-2 | | https://avd.aquasec.com/nvd/cve-2018-25009 | +| CVE-2018-25010 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp3 | 0.6.1-2 | | https://avd.khulnasoft.com/nvd/cve-2018-25009 | @@ -33,7 +33,7 @@ h4. Low severity vulnerabilities || ID || Title || Resource || Installed version || Fixed version || Url || -| CVE-2018-25011 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp4 | 0.6.1-2 | | https://avd.aquasec.com/nvd/cve-2018-25009 | +| CVE-2018-25011 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp4 | 0.6.1-2 | | https://avd.khulnasoft.com/nvd/cve-2018-25009 | @@ -41,6 +41,6 @@ h4. Unknown severity vulnerabilities || ID || Title || Resource || Installed version || Fixed version || Url || -| CVE-2018-25012 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp5 | 0.6.1-2 | | https://avd.aquasec.com/nvd/cve-2018-25009 | +| CVE-2018-25012 | libwebp: out-of-bounds read in WebPMuxCreateInternal | libwebp5 | 0.6.1-2 | | https://avd.khulnasoft.com/nvd/cve-2018-25009 | diff --git a/regoservice/testdata/goldens/tunnel-operator-slack.golden b/regoservice/testdata/goldens/tunnel-operator-slack.golden new file mode 100644 index 0000000..7a8b56b --- /dev/null +++ b/regoservice/testdata/goldens/tunnel-operator-slack.golden @@ -0,0 +1 @@ +[{"text":{"text":"Vulnerability issue with image:library/nginx:1.16 in namespace default","type":"plain_text"},"type":"header"},{"type":"divider"},{"elements":[{"text":"*Summary totals:*","type":"mrkdwn"}],"type":"context"},{"elements":[{"text":"Critical: *2*","type":"mrkdwn"},{"text":"High: *0*","type":"mrkdwn"},{"text":"Medium: *0*","type":"mrkdwn"},{"text":"Low: *0*","type":"mrkdwn"},{"text":"Unknown: *0*","type":"mrkdwn"}],"type":"context"},{"type":"divider"},{"text":{"text":"*CRITICAL severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.khulnasoft.com/nvd/cve-2019-20367|CVE-2019-20367\u003e","type":"mrkdwn"},{"text":"libbsd0 / 0.9.1-2 / 0.9.1-2+deb10u1","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*HIGH severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.khulnasoft.com/nvd/cve-2018-25009|CVE-2018-25009\u003e","type":"mrkdwn"},{"text":"libwebp6 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*MEDIUM severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.khulnasoft.com/nvd/cve-2018-25009|CVE-2018-25010\u003e","type":"mrkdwn"},{"text":"libwebp3 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*LOW severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.khulnasoft.com/nvd/cve-2018-25009|CVE-2018-25011\u003e","type":"mrkdwn"},{"text":"libwebp4 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"},{"text":{"text":"*UNKNOWN severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource / Version / Fixed version*","type":"mrkdwn"},{"text":"\u003chttps://avd.khulnasoft.com/nvd/cve-2018-25009|CVE-2018-25012\u003e","type":"mrkdwn"},{"text":"libwebp5 / 0.6.1-2 / ","type":"mrkdwn"}],"type":"section"},{"type":"divider"}] \ No newline at end of file diff --git a/regoservice/testdata/goldens/trivy-vulns-slack.golden b/regoservice/testdata/goldens/tunnel-vulns-slack.golden similarity index 100% rename from regoservice/testdata/goldens/trivy-vulns-slack.golden rename to regoservice/testdata/goldens/tunnel-vulns-slack.golden diff --git a/regoservice/testdata/goldens/vuls-html.golden b/regoservice/testdata/goldens/vuls-html.golden index 1822854..3a4eae0 100644 --- a/regoservice/testdata/goldens/vuls-html.golden +++ b/regoservice/testdata/goldens/vuls-html.golden @@ -1,6 +1,6 @@

Image name: all-in-one:3.5.19223

-

Registry: Aqua

+

Registry: Khulnasoft

Image is compliant

Malware found: Yes

Sensitive data found: Yes

diff --git a/regoservice/testdata/goldens/vuls-slack.golden b/regoservice/testdata/goldens/vuls-slack.golden index 4b173d0..ef5420c 100644 --- a/regoservice/testdata/goldens/vuls-slack.golden +++ b/regoservice/testdata/goldens/vuls-slack.golden @@ -1 +1 @@ -[{"text":{"text":"Image name: all-in-one:3.5.19223","type":"mrkdwn"},"type":"section"},{"text":{"text":"Registry: Aqua","type":"mrkdwn"},"type":"section"},{"text":{"text":"Image is compliant","type":"mrkdwn"},"type":"section"},{"text":{"text":"Malware found: Yes","type":"mrkdwn"},"type":"section"},{"text":{"text":"Sensitive data found: Yes","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*CRITICAL*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*HIGH*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*MEDIUM*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*LOW*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*NEGLIGIBLE*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*Assurance controls*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*#* *Control*","type":"mrkdwn"},{"text":"*Policy Name* / *Status*","type":"mrkdwn"},{"text":"1 malware","type":"mrkdwn"},{"text":"Default / PASS","type":"mrkdwn"},{"text":"2 license","type":"mrkdwn"},{"text":"Default / PASS","type":"mrkdwn"},{"text":"3 max_severity","type":"mrkdwn"},{"text":"Default / PASS","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*Found vulnerabilities*","type":"mrkdwn"},"type":"section"},{"text":{"text":"*critical severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2018-1000517","type":"mrkdwn"},{"text":"busybox/1.28.4-r3/1.29.0","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*high severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2021-33560","type":"mrkdwn"},{"text":"libgcrypt/1.8.3-r0/1.8.8","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*medium severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2019-12904","type":"mrkdwn"},{"text":"libgcrypt/1.8.3-r0/1.8.3-r1","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*low severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2018-20679","type":"mrkdwn"},{"text":"busybox/1.28.4-r3/1.30.0","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*negligible severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2019-5747","type":"mrkdwn"},{"text":"busybox/1.28.4-r3/none","type":"mrkdwn"}],"type":"section"},{"text":{"text":"Malware","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*# Malware*","type":"mrkdwn"},{"text":"*Hash / Path*","type":"mrkdwn"}],"type":"section"}] \ No newline at end of file +[{"text":{"text":"Image name: all-in-one:3.5.19223","type":"mrkdwn"},"type":"section"},{"text":{"text":"Registry: Khulnasoft","type":"mrkdwn"},"type":"section"},{"text":{"text":"Image is compliant","type":"mrkdwn"},"type":"section"},{"text":{"text":"Malware found: Yes","type":"mrkdwn"},"type":"section"},{"text":{"text":"Sensitive data found: Yes","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*CRITICAL*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*HIGH*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*MEDIUM*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*LOW*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"},{"text":"*NEGLIGIBLE*","type":"mrkdwn"},{"text":"*1*","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*Assurance controls*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*#* *Control*","type":"mrkdwn"},{"text":"*Policy Name* / *Status*","type":"mrkdwn"},{"text":"1 malware","type":"mrkdwn"},{"text":"Default / PASS","type":"mrkdwn"},{"text":"2 license","type":"mrkdwn"},{"text":"Default / PASS","type":"mrkdwn"},{"text":"3 max_severity","type":"mrkdwn"},{"text":"Default / PASS","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*Found vulnerabilities*","type":"mrkdwn"},"type":"section"},{"text":{"text":"*critical severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2018-1000517","type":"mrkdwn"},{"text":"busybox/1.28.4-r3/1.29.0","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*high severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2021-33560","type":"mrkdwn"},{"text":"libgcrypt/1.8.3-r0/1.8.8","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*medium severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2019-12904","type":"mrkdwn"},{"text":"libgcrypt/1.8.3-r0/1.8.3-r1","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*low severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2018-20679","type":"mrkdwn"},{"text":"busybox/1.28.4-r3/1.30.0","type":"mrkdwn"}],"type":"section"},{"text":{"text":"*negligible severity vulnerabilities*","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*Vulnerability ID*","type":"mrkdwn"},{"text":"*Resource name / Installed version / Fix version*","type":"mrkdwn"},{"text":"CVE-2019-5747","type":"mrkdwn"},{"text":"busybox/1.28.4-r3/none","type":"mrkdwn"}],"type":"section"},{"text":{"text":"Malware","type":"mrkdwn"},"type":"section"},{"fields":[{"text":"*# Malware*","type":"mrkdwn"},{"text":"*Hash / Path*","type":"mrkdwn"}],"type":"section"}] \ No newline at end of file diff --git a/regoservice/testdata/inputs/.DS_Store b/regoservice/testdata/inputs/.DS_Store new file mode 100644 index 0000000..e4d0d6e Binary files /dev/null and b/regoservice/testdata/inputs/.DS_Store differ diff --git a/regoservice/testdata/inputs/aqua-incident-input.json b/regoservice/testdata/inputs/khulnasoft-incident-input.json similarity index 100% rename from regoservice/testdata/inputs/aqua-incident-input.json rename to regoservice/testdata/inputs/khulnasoft-incident-input.json diff --git a/regoservice/testdata/inputs/aqua-input.json b/regoservice/testdata/inputs/khulnasoft-input.json similarity index 82% rename from regoservice/testdata/inputs/aqua-input.json rename to regoservice/testdata/inputs/khulnasoft-input.json index f116c85..400d11c 100644 --- a/regoservice/testdata/inputs/aqua-input.json +++ b/regoservice/testdata/inputs/khulnasoft-input.json @@ -1,6 +1,6 @@ { "image": "all-in-one:3.5.19223", - "registry": "Aqua", + "registry": "Khulnasoft", "scan_started": { "seconds": 1624544066, "nanos": 881635578 @@ -42,13 +42,13 @@ "nvd_score_v3": 5.9, "nvd_vectors_v3": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N", "nvd_severity_v3": "medium", - "aqua_score": 4.3, - "aqua_severity": "medium", - "aqua_vectors": "AV:N/AC:M/Au:N/C:P/I:N/A:N", - "aqua_scoring_system": "CVSS V2", + "khulnasoft_score": 4.3, + "khulnasoft_severity": "medium", + "khulnasoft_vectors": "AV:N/AC:M/Au:N/C:P/I:N/A:N", + "khulnasoft_scoring_system": "CVSS V2", "heuristic_ref_id": 328557, - "aqua_severity_classification": "NVD CVSS V2 Score: 4.3", - "aqua_score_classification": "NVD CVSS V2 Score: 4.3" + "khulnasoft_severity_classification": "NVD CVSS V2 Score: 4.3", + "khulnasoft_score_classification": "NVD CVSS V2 Score: 4.3" }, { "name": "CVE-2021-33560", @@ -64,12 +64,12 @@ "nvd_score_v3": 7.5, "nvd_vectors_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "nvd_severity_v3": "high", - "aqua_score": 5, - "aqua_severity": "high", - "aqua_vectors": "AV:N/AC:L/Au:N/C:P/I:N/A:N", - "aqua_scoring_system": "CVSS V2", - "aqua_severity_classification": "NVD CVSS V2 Score: 5.0", - "aqua_score_classification": "NVD CVSS V2 Score: 5.0" + "khulnasoft_score": 5, + "khulnasoft_severity": "high", + "khulnasoft_vectors": "AV:N/AC:L/Au:N/C:P/I:N/A:N", + "khulnasoft_scoring_system": "CVSS V2", + "khulnasoft_severity_classification": "NVD CVSS V2 Score: 5.0", + "khulnasoft_score_classification": "NVD CVSS V2 Score: 5.0" } ] }, @@ -101,12 +101,12 @@ "nvd_score_v3": 9.8, "nvd_vectors_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "nvd_severity_v3": "critical", - "aqua_score": 7.5, - "aqua_severity": "critical", - "aqua_vectors": "AV:N/AC:L/Au:N/C:P/I:P/A:P", - "aqua_scoring_system": "CVSS V2", - "aqua_severity_classification": "NVD CVSS V2 Score: 7.5", - "aqua_score_classification": "NVD CVSS V2 Score: 7.5" + "khulnasoft_score": 7.5, + "khulnasoft_severity": "critical", + "khulnasoft_vectors": "AV:N/AC:L/Au:N/C:P/I:P/A:P", + "khulnasoft_scoring_system": "CVSS V2", + "khulnasoft_severity_classification": "NVD CVSS V2 Score: 7.5", + "khulnasoft_score_classification": "NVD CVSS V2 Score: 7.5" }, { "name": "CVE-2018-20679", @@ -122,12 +122,12 @@ "nvd_score_v3": 7.5, "nvd_vectors_v3": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "nvd_severity_v3": "low", - "aqua_score": 5, - "aqua_severity": "low", - "aqua_vectors": "AV:N/AC:L/Au:N/C:P/I:N/A:N", - "aqua_scoring_system": "CVSS V2", - "aqua_severity_classification": "NVD CVSS V2 Score: 5.0", - "aqua_score_classification": "NVD CVSS V2 Score: 5.0" + "khulnasoft_score": 5, + "khulnasoft_severity": "low", + "khulnasoft_vectors": "AV:N/AC:L/Au:N/C:P/I:N/A:N", + "khulnasoft_scoring_system": "CVSS V2", + "khulnasoft_severity_classification": "NVD CVSS V2 Score: 5.0", + "khulnasoft_score_classification": "NVD CVSS V2 Score: 5.0" }, { "name": "CVE-2019-5747", @@ -143,12 +143,12 @@ "nvd_score_v3": 7.5, "nvd_vectors_v3": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "nvd_severity_v3": "negligible", - "aqua_score": 5, - "aqua_severity": "negligible", - "aqua_vectors": "AV:N/AC:L/Au:N/C:P/I:N/A:N", - "aqua_scoring_system": "CVSS V2", - "aqua_severity_classification": "NVD CVSS V2 Score: 5.0", - "aqua_score_classification": "NVD CVSS V2 Score: 5.0" + "khulnasoft_score": 5, + "khulnasoft_severity": "negligible", + "khulnasoft_vectors": "AV:N/AC:L/Au:N/C:P/I:N/A:N", + "khulnasoft_scoring_system": "CVSS V2", + "khulnasoft_severity_classification": "NVD CVSS V2 Score: 5.0", + "khulnasoft_score_classification": "NVD CVSS V2 Score: 5.0" } ] } @@ -214,7 +214,7 @@ }, "initiating_user": "upwork", "data_date": 1624490283, - "pull_name": "registry.aquasec.com/all-in-one:3.5.19223", + "pull_name": "registry.khulnasoft.com/all-in-one:3.5.19223", "changed_result": false, "function_metadata": {}, "scan_id": 386815, diff --git a/regoservice/testdata/inputs/aqua-insight-input.json b/regoservice/testdata/inputs/khulnasoft-insight-input.json similarity index 96% rename from regoservice/testdata/inputs/aqua-insight-input.json rename to regoservice/testdata/inputs/khulnasoft-insight-input.json index b03bf33..f880f02 100644 --- a/regoservice/testdata/inputs/aqua-insight-input.json +++ b/regoservice/testdata/inputs/khulnasoft-insight-input.json @@ -24,7 +24,7 @@ "insight": { "category": "", "description": "Workloads or images containing login data", - "id": "aqua-3006", + "id": "khulnasoft-3006", "impact": "Attackers with access to this workload or image might be able to use the login data to gain initial access to other resources", "instance": 0, "priority": 2, @@ -32,8 +32,8 @@ "suppress_resources": 0, "suppress_resources_with_expiration": 0, "total_impacted_resources": 0 }, - "postee": { - "AquaServer": "" }, + "hooker": { + "KhulnasoftServer": "" }, "resource": { "arn": "", "cluster_arn": "", diff --git a/regoservice/testdata/inputs/trivy-input.json b/regoservice/testdata/inputs/tunnel-input.json similarity index 98% rename from regoservice/testdata/inputs/trivy-input.json rename to regoservice/testdata/inputs/tunnel-input.json index 0c1bbdf..63dc586 100644 --- a/regoservice/testdata/inputs/trivy-input.json +++ b/regoservice/testdata/inputs/tunnel-input.json @@ -28,7 +28,7 @@ "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17571", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2019-17571", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", @@ -188,7 +188,7 @@ "Status": "affected", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23305", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2022-23305", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", @@ -244,7 +244,7 @@ "Status": "affected", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2021-4104", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2021-4104", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", @@ -308,7 +308,7 @@ "Status": "affected", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23302", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2022-23302", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", @@ -364,7 +364,7 @@ "Status": "affected", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2022-23307", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2022-23307", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", @@ -419,7 +419,7 @@ "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2023-26464", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2023-26464", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", @@ -464,7 +464,7 @@ "Status": "fixed", "Layer": {}, "SeveritySource": "nvd", - "PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-9488", + "PrimaryURL": "https://avd.khulnasoft.com/nvd/cve-2020-9488", "DataSource": { "ID": "glad", "Name": "GitLab Advisory Database Community", diff --git a/regoservice/testdata/inputs/trivy-operator-input.json b/regoservice/testdata/inputs/tunnel-operator-input.json similarity index 78% rename from regoservice/testdata/inputs/trivy-operator-input.json rename to regoservice/testdata/inputs/tunnel-operator-input.json index 9598711..48a0aa7 100644 --- a/regoservice/testdata/inputs/trivy-operator-input.json +++ b/regoservice/testdata/inputs/tunnel-operator-input.json @@ -1,14 +1,14 @@ { - "apiVersion": "aquasecurity.github.io/v1alpha1", + "apiVersion": "khulnasoft-lab.github.io/v1alpha1", "kind": "VulnerabilityReport", "metadata": { "name": "replicaset-nginx-6d4cf56db6-nginx", "namespace": "default", "labels": { - "trivy-operator.container.name": "nginx", - "trivy-operator.resource.kind": "ReplicaSet", - "trivy-operator.resource.name": "nginx-6d4cf56db6", - "trivy-operator.resource.namespace": "default", + "tunnel-operator.container.name": "nginx", + "tunnel-operator.resource.kind": "ReplicaSet", + "tunnel-operator.resource.name": "nginx-6d4cf56db6", + "tunnel-operator.resource.namespace": "default", "resource-spec-hash": "7cb64cb677" }, "uid": "8aa1a7cb-a319-4b93-850d-5a67827dfbbf", @@ -32,8 +32,8 @@ "server": "index.docker.io" }, "scanner": { - "name": "Trivy", - "vendor": "Aqua Security", + "name": "Tunnel", + "vendor": "Khulnasoft Security", "version": "0.30.0" }, "summary": { @@ -48,7 +48,7 @@ "fixedVersion": "0.9.1-2+deb10u1", "installedVersion": "0.9.1-2", "links": [], - "primaryLink": "https://avd.aquasec.com/nvd/cve-2019-20367", + "primaryLink": "https://avd.khulnasoft.com/nvd/cve-2019-20367", "resource": "libbsd0", "score": 9.1, "severity": "CRITICAL", @@ -60,7 +60,7 @@ "fixedVersion": "", "installedVersion": "0.6.1-2", "links": [], - "primaryLink": "https://avd.aquasec.com/nvd/cve-2018-25009", + "primaryLink": "https://avd.khulnasoft.com/nvd/cve-2018-25009", "resource": "libwebp6", "score": 6.1, "severity": "HIGH", @@ -72,7 +72,7 @@ "fixedVersion": "", "installedVersion": "0.6.1-2", "links": [], - "primaryLink": "https://avd.aquasec.com/nvd/cve-2018-25009", + "primaryLink": "https://avd.khulnasoft.com/nvd/cve-2018-25009", "resource": "libwebp3", "score": 3.2, "severity": "MEDIUM", @@ -84,7 +84,7 @@ "fixedVersion": "", "installedVersion": "0.6.1-2", "links": [], - "primaryLink": "https://avd.aquasec.com/nvd/cve-2018-25009", + "primaryLink": "https://avd.khulnasoft.com/nvd/cve-2018-25009", "resource": "libwebp4", "score": 1.1, "severity": "LOW", @@ -96,7 +96,7 @@ "fixedVersion": "", "installedVersion": "0.6.1-2", "links": [], - "primaryLink": "https://avd.aquasec.com/nvd/cve-2018-25009", + "primaryLink": "https://avd.khulnasoft.com/nvd/cve-2018-25009", "resource": "libwebp5", "score": 0, "severity": "UNKNOWN", diff --git a/regoservice/testdata/templates/.DS_Store b/regoservice/testdata/templates/.DS_Store new file mode 100644 index 0000000..063bc3f Binary files /dev/null and b/regoservice/testdata/templates/.DS_Store differ diff --git a/regoservice/testdata/templates/common/common.rego b/regoservice/testdata/templates/common/common.rego index 0a80a80..f7b16e2 100644 --- a/regoservice/testdata/templates/common/common.rego +++ b/regoservice/testdata/templates/common/common.rego @@ -1,4 +1,4 @@ -package postee +package hooker flat_array(a) = o { o:=[item | item:=a[_][_] diff --git a/router/builders.go b/router/builders.go index 30f5253..fe06529 100644 --- a/router/builders.go +++ b/router/builders.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/aquasecurity/postee/v2/actions" + "github.com/khulnasoft-lab/hooker/v2/actions" ) func buildStdoutAction(sourceSettings *ActionSettings) *actions.StdoutAction { @@ -32,10 +32,10 @@ func buildWebhookAction(sourceSettings *ActionSettings) *actions.WebhookAction { } } -func buildTeamsAction(sourceSettings *ActionSettings, aquaServer string) *actions.TeamsAction { +func buildTeamsAction(sourceSettings *ActionSettings, khulnasoftServer string) *actions.TeamsAction { return &actions.TeamsAction{ Name: sourceSettings.Name, - AquaServer: aquaServer, + KhulnasoftServer: khulnasoftServer, Webhook: sourceSettings.Url, } } @@ -54,10 +54,10 @@ func buildServiceNow(sourceSettings *ActionSettings) *actions.ServiceNowAction { return serviceNow } -func buildSlackAction(sourceSettings *ActionSettings, aqua string) *actions.SlackAction { +func buildSlackAction(sourceSettings *ActionSettings, khulnasoft string) *actions.SlackAction { return &actions.SlackAction{ Name: sourceSettings.Name, - AquaServer: aqua, + KhulnasoftServer: khulnasoft, Url: sourceSettings.Url, } } diff --git a/router/goldens/sample.cfg b/router/goldens/sample.cfg index e0c1e99..c930ae5 100644 --- a/router/goldens/sample.cfg +++ b/router/goldens/sample.cfg @@ -1,8 +1,8 @@ -name: Postee Controller Runner Demo +name: Hooker Controller Runner Demo -aqua-server: # URL of Aqua Server for links. E.g. https://myserver.aquasec.com +khulnasoft-server: # URL of Khulnasoft Server for links. E.g. https://myserver.khulnasoft.com max-db-size: 1000MB # Max size of DB. pattern is used, such as "300MB" or "1GB". If empty or 0 then unlimited -db-verify-interval: 1 # How often to check the DB size. By default, Postee checks every 1 hour +db-verify-interval: 1 # How often to check the DB size. By default, Hooker checks every 1 hour # Routes are used to define how to handle an incoming message routes: @@ -30,7 +30,7 @@ routes: # Templates are used to format a message templates: - name: raw-json # route message "As Is" to external webhook - rego-package: postee.rawmessage.json + rego-package: hooker.rawmessage.json # Outputs are target services that should consume the messages actions: @@ -51,17 +51,17 @@ actions: Input Image: event.input.image - name: my-exec-from-runner - runs-on: "postee-runner-1" + runs-on: "hooker-runner-1" type: exec enable: true env: ["MY_ENV_VAR=foo_bar_baz", "MY_KEY=secret"] # Optional. Any environment variables to pass in exec-script: | # Specify the script to run #!/bin/sh - echo $POSTEE_EVENT - echo "this is hello from postee" + echo $HOOKER_EVENT + echo "this is hello from hooker" - name: my-http-post-from-runner - runs-on: "postee-runner-1" + runs-on: "hooker-runner-1" type: http enable: true url: "https://webhook.site/" # Required. URL of the HTTP Request diff --git a/router/inittemplate_test.go b/router/inittemplate_test.go index 3b0b3dd..28964f7 100644 --- a/router/inittemplate_test.go +++ b/router/inittemplate_test.go @@ -11,7 +11,7 @@ import ( ) var ( - regoRule = "package postee.slack" + regoRule = "package hooker.slack" ) func TestInitTemplate(t *testing.T) { @@ -59,7 +59,7 @@ func TestInitTemplate(t *testing.T) { { template: &Template{ Name: "built-in", - RegoPackage: "postee.slack", + RegoPackage: "hooker.slack", }, caseDesc: "Built-in rego package", expectedCls: "*regoservice.regoEvaluator", @@ -93,7 +93,7 @@ func TestInitTemplate(t *testing.T) { { template: &Template{ Name: "inline", - Body: "package postee.inline", + Body: "package hooker.inline", }, caseDesc: "Loading rego from yaml config", expectedCls: "*regoservice.regoEvaluator", diff --git a/router/loads_test.go b/router/loads_test.go index 2a30133..e085815 100644 --- a/router/loads_test.go +++ b/router/loads_test.go @@ -8,11 +8,11 @@ import ( "testing" "time" - "github.com/aquasecurity/postee/v2/actions" - "github.com/aquasecurity/postee/v2/data" - "github.com/aquasecurity/postee/v2/dbservice" - "github.com/aquasecurity/postee/v2/msgservice" - "github.com/aquasecurity/postee/v2/routes" + "github.com/khulnasoft-lab/hooker/v2/actions" + "github.com/khulnasoft-lab/hooker/v2/data" + "github.com/khulnasoft-lab/hooker/v2/dbservice" + "github.com/khulnasoft-lab/hooker/v2/msgservice" + "github.com/khulnasoft-lab/hooker/v2/routes" ) type ctxWrapper struct { @@ -32,7 +32,7 @@ type invctn struct { routeName string } -func (ctx *ctxWrapper) MsgHandling(input []byte, action actions.Action, route *routes.InputRoute, inpteval data.Inpteval, aquaServer *string) { +func (ctx *ctxWrapper) MsgHandling(input []byte, action actions.Action, route *routes.InputRoute, inpteval data.Inpteval, khulnasoftServer *string) { i := invctn{ fmt.Sprintf("%T", action), fmt.Sprintf("%T", inpteval), @@ -97,7 +97,7 @@ func TestLoads(t *testing.T) { t.Skip("FIXME: this test makes an external call") cfgData := ` name: tenant -aqua-server: https://demolab.aquasec.com +khulnasoft-server: https://demolab.khulnasoft.com max-db-size: 13MB # Max size of DB. pattern is used, such as "300MB" or "1GB". If empty or 0 then unlimited delete-old-data: 7 # delete data older than N day(s). If empty then we do not delete.d @@ -163,9 +163,9 @@ actions: t.Errorf("'jira' action didn't start!") } - expectedSrvUrl := "https://demolab.aquasec.com/#/images/" - if demoCtx.aquaServer != expectedSrvUrl { - t.Errorf("Wrong init of AquaServer link.\nWait: %q\nGot: %q", expectedSrvUrl, demoCtx.aquaServer) + expectedSrvUrl := "https://demolab.khulnasoft.com/#/images/" + if demoCtx.khulnasoftServer != expectedSrvUrl { + t.Errorf("Wrong init of KhulnasoftServer link.\nWait: %q\nGot: %q", expectedSrvUrl, demoCtx.khulnasoftServer) } if _, ok := demoCtx.actions["splunk"]; !ok { @@ -176,7 +176,7 @@ func TestReload(t *testing.T) { t.Skip("FIXME: this test makes an external call") cfgData := ` name: tenant -aqua-server: https://demolab.aquasec.com +khulnasoft-server: https://demolab.khulnasoft.com max-db-size: 13MB # Max size of DB. pattern is used, such as "300MB" or "1GB". If empty or 0 then unlimited delete-old-data: 7 # delete data older than N day(s). If empty then we do not delete.d diff --git a/router/parsecfg.go b/router/parsecfg.go index 575cc78..2c4e3cb 100644 --- a/router/parsecfg.go +++ b/router/parsecfg.go @@ -15,8 +15,8 @@ const ( @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - Options supported only in Postee V1 are found in %s. Please make sure app is configured correctly! - See https://github.com/aquasecurity/postee/blob/main/README.md for the details. + Options supported only in Hooker V1 are found in %s. Please make sure app is configured correctly! + See https://github.com/khulnasoft-lab/hooker/blob/main/README.md for the details. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ diff --git a/router/routehandling_test.go b/router/routehandling_test.go index 99859d2..d5b746d 100644 --- a/router/routehandling_test.go +++ b/router/routehandling_test.go @@ -19,7 +19,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: @@ -39,7 +39,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: @@ -66,7 +66,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: @@ -88,7 +88,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: @@ -113,7 +113,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input` noTemplates string = ` Name: tenant @@ -147,7 +147,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: @@ -168,7 +168,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: @@ -189,7 +189,7 @@ routes: templates: - name: raw body: | - package postee + package hooker result:=input actions: diff --git a/router/router.go b/router/router.go index 6f440cb..f17475c 100644 --- a/router/router.go +++ b/router/router.go @@ -13,14 +13,14 @@ import ( "sync" "time" - "github.com/aquasecurity/postee/v2/actions" - "github.com/aquasecurity/postee/v2/data" - "github.com/aquasecurity/postee/v2/dbservice" - "github.com/aquasecurity/postee/v2/formatting" - "github.com/aquasecurity/postee/v2/msgservice" - "github.com/aquasecurity/postee/v2/regoservice" - "github.com/aquasecurity/postee/v2/routes" - "github.com/aquasecurity/postee/v2/utils" + "github.com/khulnasoft-lab/hooker/v2/actions" + "github.com/khulnasoft-lab/hooker/v2/data" + "github.com/khulnasoft-lab/hooker/v2/dbservice" + "github.com/khulnasoft-lab/hooker/v2/formatting" + "github.com/khulnasoft-lab/hooker/v2/msgservice" + "github.com/khulnasoft-lab/hooker/v2/regoservice" + "github.com/khulnasoft-lab/hooker/v2/routes" + "github.com/khulnasoft-lab/hooker/v2/utils" "github.com/ghodss/yaml" "github.com/nats-io/nats-server/v2/server" "github.com/nats-io/nats.go" @@ -47,7 +47,7 @@ type Router struct { ticker *time.Ticker stopTicker chan struct{} cfgfile string - aquaServer string + khulnasoftServer string actions map[string]actions.Action inputRoutes map[string]*routes.InputRoute templates map[string]data.Inpteval @@ -220,12 +220,12 @@ func (ctx *Router) load() error { return err } - if len(tenant.AquaServer) > 0 { + if len(tenant.KhulnasoftServer) > 0 { var slash string - if !strings.HasSuffix(tenant.AquaServer, "/") { + if !strings.HasSuffix(tenant.KhulnasoftServer, "/") { slash = "/" } - ctx.aquaServer = fmt.Sprintf("%s%s#/images/", tenant.AquaServer, slash) + ctx.khulnasoftServer = fmt.Sprintf("%s%s#/images/", tenant.KhulnasoftServer, slash) } dbservice.DbSizeLimit = parseSize(tenant.DBMaxSize) @@ -259,7 +259,7 @@ func (ctx *Router) load() error { utils.Debug("%#v\n", anonymizeSettings(&settings)) if settings.Enable { - plg := BuildAndInitOtpt(&settings, ctx.aquaServer) + plg := BuildAndInitOtpt(&settings, ctx.khulnasoftServer) if plg != nil { log.Printf("Action %s is configured", settings.Name) ctx.actions[settings.Name] = plg @@ -270,7 +270,7 @@ func (ctx *Router) load() error { } type service interface { - MsgHandling(input []byte, output actions.Action, route *routes.InputRoute, inpteval data.Inpteval, aquaServer *string) + MsgHandling(input []byte, output actions.Action, route *routes.InputRoute, inpteval data.Inpteval, khulnasoftServer *string) EvaluateRegoRule(input *routes.InputRoute, in []byte) bool } @@ -296,7 +296,7 @@ func (ctx *Router) HandleRoute(routeName string, in []byte) { // send event up to controller unconditionally, in case controller knows if ctx.Mode == "runner" { log.Println("Sending event upstream to controller at url: ", ctx.ControllerURL) - NATSEventSubject := "postee.events" + NATSEventSubject := "hooker.events" if err := ctx.NatsConn.Publish(NATSEventSubject, in); err != nil { // TODO: What happens if controller is unavailable? log.Println("Unable to send event upstream to controller at url: ", ctx.ControllerURL, "err: ", err.Error()) } @@ -342,9 +342,9 @@ func (ctx *Router) HandleRoute(routeName string, in []byte) { log.Printf("route %q is associated with template %q", routeName, r.Template) if r.SerializeActions { - getScanService().MsgHandling(in, pl, r, tmpl, &ctx.aquaServer) + getScanService().MsgHandling(in, pl, r, tmpl, &ctx.khulnasoftServer) } else { - go getScanService().MsgHandling(in, pl, r, tmpl, &ctx.aquaServer) + go getScanService().MsgHandling(in, pl, r, tmpl, &ctx.khulnasoftServer) } } } @@ -354,7 +354,7 @@ func (ctx *Router) handle(in []byte) { ctx.HandleRoute(routeName, in) } } -func BuildAndInitOtpt(settings *ActionSettings, aquaServerUrl string) actions.Action { +func BuildAndInitOtpt(settings *ActionSettings, khulnasoftServerUrl string) actions.Action { settings.User = utils.GetEnvironmentVarOrPlain(settings.User) if len(settings.User) == 0 && requireAuthorization[settings.Type] { log.Printf("User for %q is empty", settings.Name) @@ -388,9 +388,9 @@ func BuildAndInitOtpt(settings *ActionSettings, aquaServerUrl string) actions.Ac case "email": plg = buildEmailAction(settings) case "slack": - plg = buildSlackAction(settings, aquaServerUrl) + plg = buildSlackAction(settings, khulnasoftServerUrl) case "teams": - plg = buildTeamsAction(settings, aquaServerUrl) + plg = buildTeamsAction(settings, khulnasoftServerUrl) case "servicenow": plg = buildServiceNow(settings) case "webhook": diff --git a/router/router_test.go b/router/router_test.go index f17525d..c64dcd1 100644 --- a/router/router_test.go +++ b/router/router_test.go @@ -23,10 +23,10 @@ func Test_buildRunnerConfig(t *testing.T) { - MY_KEY=secret exec-script: | #!/bin/sh - echo $POSTEE_EVENT - echo "this is hello from postee" + echo $HOOKER_EVENT + echo "this is hello from hooker" name: my-exec-from-runner - runs-on: postee-runner-1 + runs-on: hooker-runner-1 type: exec - body-content: | This is an another example of a inline body @@ -34,7 +34,7 @@ func Test_buildRunnerConfig(t *testing.T) { enable: true method: POST name: my-http-post-from-runner - runs-on: postee-runner-1 + runs-on: hooker-runner-1 type: http url: https://webhook.site/ db-verify-interval: 1 @@ -74,7 +74,7 @@ routes: template: raw-json templates: - name: raw-json - rego-package: postee.rawmessage.json`, + rego-package: hooker.rawmessage.json`, }, { name: "sad path, config not found", @@ -85,7 +85,7 @@ templates: for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - got, err := buildRunnerConfig("postee-runner-1", tc.cfgFile) + got, err := buildRunnerConfig("hooker-runner-1", tc.cfgFile) switch { case tc.expectedError != "": assert.Equal(t, tc.expectedError, err.Error(), tc.name) diff --git a/router/tenants.go b/router/tenants.go index d07f40d..2530709 100644 --- a/router/tenants.go +++ b/router/tenants.go @@ -1,11 +1,11 @@ package router import ( - "github.com/aquasecurity/postee/v2/routes" + "github.com/khulnasoft-lab/hooker/v2/routes" ) type TenantSettings struct { - AquaServer string `json:"aqua-server,omitempty"` + KhulnasoftServer string `json:"khulnasoft-server,omitempty"` DBMaxSize string `json:"max-db-size,omitempty"` DBRemoveOldData int `json:"delete-old-data,omitempty"` DBTestInterval int `json:"db-verify-interval,omitempty"` diff --git a/runner/runner.go b/runner/runner.go index b2dab49..e430a1a 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -6,12 +6,12 @@ import ( "os" "time" - "github.com/aquasecurity/postee/v2/router" + "github.com/khulnasoft-lab/hooker/v2/router" "github.com/nats-io/nats.go" ) const ( - NATSConfigSubject = "postee.config" + NATSConfigSubject = "hooker.config" ) type Runner struct { diff --git a/servicenow/insert_table.go b/servicenow/insert_table.go index 6d9672c..4515397 100644 --- a/servicenow/insert_table.go +++ b/servicenow/insert_table.go @@ -6,7 +6,7 @@ import ( "fmt" "net/http" - "github.com/aquasecurity/postee/v2/utils" + "github.com/khulnasoft-lab/hooker/v2/utils" ) func InsertRecordToTable(user, password, instance, table string, content []byte) error { diff --git a/teams/teams_requests.go b/teams/teams_requests.go index 3420134..864f3d5 100644 --- a/teams/teams_requests.go +++ b/teams/teams_requests.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "net/http" - "github.com/aquasecurity/postee/v2/utils" + "github.com/khulnasoft-lab/hooker/v2/utils" ) func CreateMessageByWebhook(webhook, content string) error { diff --git a/ui/.DS_Store b/ui/.DS_Store new file mode 100644 index 0000000..59f6095 Binary files /dev/null and b/ui/.DS_Store differ diff --git a/ui/backend/.DS_Store b/ui/backend/.DS_Store new file mode 100644 index 0000000..7f3d295 Binary files /dev/null and b/ui/backend/.DS_Store differ diff --git a/ui/backend/dbservice/getplgnstats.go b/ui/backend/dbservice/getplgnstats.go index b3aef09..a9435a4 100644 --- a/ui/backend/dbservice/getplgnstats.go +++ b/ui/backend/dbservice/getplgnstats.go @@ -4,7 +4,7 @@ import ( "os" "strconv" - hookDbService "github.com/aquasecurity/postee/v2/dbservice" + hookDbService "github.com/khulnasoft-lab/hooker/v2/dbservice" bolt "go.etcd.io/bbolt" ) diff --git a/ui/backend/go.mod b/ui/backend/go.mod index b52279a..efd25eb 100644 --- a/ui/backend/go.mod +++ b/ui/backend/go.mod @@ -1,24 +1,37 @@ -module github.com/aquasecurity/postee/ui/backend +module github.com/khulnasoft-lab/hooker/ui/backend go 1.18 require ( - github.com/aquasecurity/postee/v2 v2.6.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/securecookie v1.1.1 github.com/gorilla/sessions v1.2.1 - github.com/stretchr/testify v1.8.0 + github.com/khulnasoft-lab/hooker/v2 v2.0.0-20231208222655-042a17f44540 + github.com/stretchr/testify v1.8.2 go.etcd.io/bbolt v1.3.6 ) require ( + github.com/DependencyTrack/client-go v0.11.0 // indirect github.com/Microsoft/go-winio v0.5.1 // indirect github.com/OneOfOne/xxhash v1.2.8 // indirect + github.com/PagerDuty/go-pagerduty v1.5.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect - github.com/aquasecurity/go-jira v0.0.0-20211103111421-b62ce48827be // indirect + github.com/aws/aws-sdk-go-v2 v1.16.11 // indirect + github.com/aws/aws-sdk-go-v2/config v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.12.14 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect + github.com/aws/aws-sdk-go-v2/service/securityhub v1.22.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 // indirect + github.com/aws/smithy-go v1.12.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v20.10.24+incompatible // indirect + github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fatih/structs v1.1.0 // indirect @@ -28,25 +41,27 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.5.3 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.14.4 // indirect + github.com/khulnasoft-lab/go-jira v0.0.0-20230817162545-9cc5eaa28404 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/kr/pretty v0.2.1 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/nats-io/jwt/v2 v2.2.1-0.20220113022732-58e87895b296 // indirect - github.com/nats-io/nats-server/v2 v2.7.4 // indirect - github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d // indirect - github.com/nats-io/nkeys v0.3.0 // indirect + github.com/nats-io/jwt/v2 v2.5.0 // indirect + github.com/nats-io/nats-server/v2 v2.9.23 // indirect + github.com/nats-io/nats.go v1.28.0 // indirect + github.com/nats-io/nkeys v0.4.6 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/open-policy-agent/opa v0.44.0 // indirect + github.com/open-policy-agent/opa v0.45.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.10 // indirect @@ -63,13 +78,13 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yashtewari/glob-intersection v0.1.0 // indirect - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/ui/backend/go.sum b/ui/backend/go.sum index 258c646..4c1fba7 100644 --- a/ui/backend/go.sum +++ b/ui/backend/go.sum @@ -46,25 +46,50 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DependencyTrack/client-go v0.11.0 h1:1g+eHC8nJyIzi68zcs+dr3OHRvS1aC+4Uy3YKA0JJhc= +github.com/DependencyTrack/client-go v0.11.0/go.mod h1:XLZnOksOs56Svq+K4xmBkN8U97gpP7r1BkhCc/xA8Iw= github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/PagerDuty/go-pagerduty v1.5.1 h1:zpMQ8WwWlUahipB2q+ERVIA9D0/ti8kvsQUSagCK86g= +github.com/PagerDuty/go-pagerduty v1.5.1/go.mod h1:txr8VbObXdk2RkqF+C2an4qWssdGY99fK26XYUDjh+4= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= -github.com/aquasecurity/go-jira v0.0.0-20211103111421-b62ce48827be h1:xUasZnauNAn2jY0gfVG+Ro371S31s3SfVUvcjhwIMyI= -github.com/aquasecurity/go-jira v0.0.0-20211103111421-b62ce48827be/go.mod h1:IHtKzIAdk0t3Xse7rJSY7pJlA8gB7lqY2b4l5WYZYsk= -github.com/aquasecurity/postee/v2 v2.6.0 h1:3UH5b7LlGLSRMMAMvjCYUwYGbkV1Wa1TQ+nlG7eoO2Y= -github.com/aquasecurity/postee/v2 v2.6.0/go.mod h1:mAE5BlBooI8z3nWHldckWcCwP1smfIVwPSLtvSAujzM= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go-v2 v1.16.11 h1:xM1ZPSvty3xVmdxiGr7ay/wlqv+MWhH0rMlyLdbC0YQ= +github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo= +github.com/aws/aws-sdk-go-v2/config v1.17.1 h1:BWxTjokU/69BZ4DnLrZco6OvBDii6ToEdfBL/y5I1nA= +github.com/aws/aws-sdk-go-v2/config v1.17.1/go.mod h1:uOxDHjBemNTF2Zos+fgG0NNfE86wn1OAHDTGxjMEYi0= +github.com/aws/aws-sdk-go-v2/credentials v1.12.14 h1:AtVG/amkjbDBfnPr/tuW2IG18HGNznP6L12Dx0rLz+Q= +github.com/aws/aws-sdk-go-v2/credentials v1.12.14/go.mod h1:opAndTyq+YN7IpVG57z2CeNuXSQMqTYxGGlYH0m0RMY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 h1:wgJBHO58Pc1V1QAnzdVM3JK3WbE/6eUF0JxCZ+/izz0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12/go.mod h1:aZ4vZnyUuxedC7eD4JyEHpGnCz+O2sHQEx3VvAwklSE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 h1:OmiwoVyLKEqqD5GvB683dbSqxiOfvx4U2lDZhG2Esc4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18/go.mod h1:348MLhzV1GSlZSMusdwQpXKbhD7X2gbI/TxwAPKkYZQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 h1:5mvQDtNWtI6H56+E4LUnLWEmATMB7oEh+Z9RurtIuC0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12/go.mod h1:ckaCVTEdGAxO6KwTGzgskxR1xM+iJW4lxMyDFVda2Fc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 h1:g5qq9sgtEzt2szMaDqQO6fqKe026T6dHTFJp5NsPzkQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19/go.mod h1:cVHo8KTuHjShb9V8/VjH3S/8+xPu16qx8fdGwmotJhE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 h1:7iPTTX4SAI2U2VOogD7/gmHlsgnYSgoNHt7MSQXtG2M= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12/go.mod h1:1TODGhheLWjpQWSuhYuAUWYTCKwEjx2iblIFKDHjeTc= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.22.7 h1:NXJ6NdzJvXkUSwmwbSRtWPvTfIg5BueQ2Z1vid8o9CQ= +github.com/aws/aws-sdk-go-v2/service/securityhub v1.22.7/go.mod h1:byhebHID81uPiHS2NQcZrKxOiB2roj3OOcWMvdxxjmk= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 h1:pXxu9u2z1UqSbjO9YA8kmFJBhFc1EVTDaf7A+S+Ivq8= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.17/go.mod h1:mS5xqLZc/6kc06IpXn5vRxdLaED+jEuaSRv5BxtnsiY= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 h1:dl8T0PJlN92rvEGOEUiD0+YPYdPEaCZK0TqHukvSfII= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.13/go.mod h1:Ru3QVMLygVs/07UQ3YDur1AQZZp2tUNje8wfloFttC0= +github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= +github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/bytecodealliance/wasmtime-go v0.36.0 h1:B6thr7RMM9xQmouBtUqm1RpkJjuLS37m6nxX+iwsQSc= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bytecodealliance/wasmtime-go v1.0.0 h1:9u9gqaUiaJeN5IoD1L7egD8atOnTGyJcNp8BhkL9cUU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -85,8 +110,8 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= -github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -103,6 +128,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -184,8 +210,10 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -208,8 +236,8 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= @@ -223,9 +251,11 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= @@ -237,29 +267,41 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/khulnasoft-lab/go-jira v0.0.0-20230817162545-9cc5eaa28404 h1:GUqiXefHe724iE/TIpJV9rcZNh4i4ej9zZpsaXvWPQM= +github.com/khulnasoft-lab/go-jira v0.0.0-20230817162545-9cc5eaa28404/go.mod h1:mMoOC4Gy3UOeJRyN7Fr5olBBZH2F/ZhxUFoNSkAtLrs= +github.com/khulnasoft-lab/hooker/v2 v2.0.0-20231208222655-042a17f44540 h1:oVieoSbj07dRQlxA45UID5YeQQBJHUWaGxnS5RfATI4= +github.com/khulnasoft-lab/hooker/v2 v2.0.0-20231208222655-042a17f44540/go.mod h1:Ri7TACRJlm6QZsCrlEFhKuNJtBn+A+6Zij+FT1l9EkY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.14.4 h1:eijASRJcobkVtSt81Olfh7JX43osYLwy5krOJo6YEu4= -github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= @@ -272,14 +314,14 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt/v2 v2.2.1-0.20220113022732-58e87895b296 h1:vU9tpM3apjYlLLeY23zRWJ9Zktr5jp+mloR942LEOpY= -github.com/nats-io/jwt/v2 v2.2.1-0.20220113022732-58e87895b296/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= -github.com/nats-io/nats-server/v2 v2.7.4 h1:c+BZJ3rGzUKCBIM4IXO8uNT2u1vajGbD1kPA6wqCEaM= -github.com/nats-io/nats-server/v2 v2.7.4/go.mod h1:1vZ2Nijh8tcyNe8BDVyTviCd9NYzRbubQYiEHsvOQWc= -github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d h1:zJf4l8Kp67RIZhoVeniSLZs69SHNgjLHz0aNsqPPlx8= -github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/jwt/v2 v2.5.0 h1:WQQ40AAlqqfx+f6ku+i0pOVm+ASirD4fUh+oQsiE9Ak= +github.com/nats-io/jwt/v2 v2.5.0/go.mod h1:24BeQtRwxRV8ruvC4CojXlx/WQ/VjuwlYiH+vu/+ibI= +github.com/nats-io/nats-server/v2 v2.9.23 h1:6Wj6H6QpP9FMlpCyWUaNu2yeZ/qGj+mdRkZ1wbikExU= +github.com/nats-io/nats-server/v2 v2.9.23/go.mod h1:wEjrEy9vnqIGE4Pqz4/c75v9Pmaq7My2IgFmnykc4C0= +github.com/nats-io/nats.go v1.28.0 h1:Th4G6zdsz2d0OqXdfzKLClo6bOfoI/b1kInhRtFIy5c= +github.com/nats-io/nats.go v1.28.0/go.mod h1:XpbWUlOElGwTYbMR7imivs7jJj9GtK7ypv321Wp6pjc= +github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY= +github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -292,10 +334,10 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= -github.com/open-policy-agent/opa v0.44.0 h1:sEZthsrWBqIN+ShTMJ0Hcz6a3GkYsY4FaB2S/ou2hZk= -github.com/open-policy-agent/opa v0.44.0/go.mod h1:YpJaFIk5pq89n/k72c1lVvfvR5uopdJft2tMg1CW/yU= +github.com/open-policy-agent/opa v0.45.0 h1:P5nuhVRtR+e58fk3CMMbiqr6ZFyWQPNOC3otsorGsFs= +github.com/open-policy-agent/opa v0.45.0/go.mod h1:/OnsYljNEWJ6DXeFOOnoGn8CvwZGMUS4iRqzYdJvmBI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= @@ -308,6 +350,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= @@ -316,7 +359,6 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= @@ -328,6 +370,7 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -335,8 +378,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/tidwall/gjson v1.14.0 h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w= @@ -374,10 +418,9 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -451,8 +494,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -478,6 +521,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -529,14 +573,14 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -546,14 +590,14 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M= -golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -607,6 +651,7 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= diff --git a/ui/backend/main.go b/ui/backend/main.go index 8cb8b83..ebf26c2 100644 --- a/ui/backend/main.go +++ b/ui/backend/main.go @@ -4,17 +4,17 @@ import ( "log" "os" - "github.com/aquasecurity/postee/ui/backend/uiserver" + "github.com/khulnasoft-lab/hooker/ui/backend/uiserver" ) const ( - ENV_FILELOG = "POSTEE_UI_LOGFILE" - ENV_CFG = "POSTEE_UI_CFG" - ENV_WEB = "POSTEE_UI_WEB" - ENV_UPDATE_URL = "POSTEE_UI_UPDATE_URL" - ENV_PORT = "POSTEE_UI_PORT" - ENV_ADMIN_USER = "POSTEE_ADMIN_USER" - ENV_ADMIN_PASSWORD = "POSTEE_ADMIN_PASSWORD" + ENV_FILELOG = "HOOKER_UI_LOGFILE" + ENV_CFG = "HOOKER_UI_CFG" + ENV_WEB = "HOOKER_UI_WEB" + ENV_UPDATE_URL = "HOOKER_UI_UPDATE_URL" + ENV_PORT = "HOOKER_UI_PORT" + ENV_ADMIN_USER = "HOOKER_ADMIN_USER" + ENV_ADMIN_PASSWORD = "HOOKER_ADMIN_PASSWORD" DEFAULT_WEB_PATH = "/uiserver/www" ) @@ -41,7 +41,7 @@ func main() { } updateUrl := os.Getenv(ENV_UPDATE_URL) if updateUrl == "" { - log.Printf("WARNING! Using an empty update url, UI won't restart your Postee instance with a saved configuration. You can change it via %q environment variable.", ENV_UPDATE_URL) + log.Printf("WARNING! Using an empty update url, UI won't restart your Hooker instance with a saved configuration. You can change it via %q environment variable.", ENV_UPDATE_URL) } port := os.Getenv(ENV_PORT) diff --git a/ui/backend/uiserver/authentication.go b/ui/backend/uiserver/authentication.go index 844cf92..a27aeda 100644 --- a/ui/backend/uiserver/authentication.go +++ b/ui/backend/uiserver/authentication.go @@ -5,7 +5,7 @@ import ( ) const ( - sessioncookiename = "postee-session-cookie" + sessioncookiename = "hooker-session-cookie" ) func (srv *uiServer) login(w http.ResponseWriter, r *http.Request) { diff --git a/ui/backend/uiserver/config.go b/ui/backend/uiserver/config.go index 84d54c9..a02cef9 100644 --- a/ui/backend/uiserver/config.go +++ b/ui/backend/uiserver/config.go @@ -8,8 +8,8 @@ import ( "net/http" "os" - hookDbService "github.com/aquasecurity/postee/v2/dbservice" - "github.com/aquasecurity/postee/v2/router" + hookDbService "github.com/khulnasoft-lab/hooker/v2/dbservice" + "github.com/khulnasoft-lab/hooker/v2/router" ) func (srv *uiServer) getConfig(w http.ResponseWriter, r *http.Request) { @@ -73,8 +73,8 @@ func (srv *uiServer) updateConfig(w http.ResponseWriter, r *http.Request) { err = reloadWebhookCfg(srv.webhookUrl, apikey) if err != nil { - log.Printf("Unable to reach Postee backend %v", err) - http.Error(w, "Unable to reach Postee backend", http.StatusBadRequest) + log.Printf("Unable to reach Hooker backend %v", err) + http.Error(w, "Unable to reach Hooker backend", http.StatusBadRequest) return } } diff --git a/ui/backend/uiserver/events.go b/ui/backend/uiserver/events.go index a7bb6b9..b356d17 100644 --- a/ui/backend/uiserver/events.go +++ b/ui/backend/uiserver/events.go @@ -10,17 +10,17 @@ import ( func (srv *uiServer) getEvents(w http.ResponseWriter, r *http.Request) { log.Printf("configured config path %s", srv.cfgPath) - posteeUrl := os.Getenv("POSTEE_UI_UPDATE_URL") - if len(posteeUrl) <= 0 { + hookerUrl := os.Getenv("HOOKER_UI_UPDATE_URL") + if len(hookerUrl) <= 0 { w.WriteHeader(http.StatusBadRequest) - log.Println("No Postee URL configured, set POSTEE_UI_UPDATE_URL to the Postee URL") + log.Println("No Hooker URL configured, set HOOKER_UI_UPDATE_URL to the Hooker URL") return } - resp, err := http.Get(posteeUrl + "/events") + resp, err := http.Get(hookerUrl + "/events") if err != nil { w.WriteHeader(http.StatusInternalServerError) - log.Println("Unable to reach Postee at URL: " + posteeUrl + "/events" + " err: " + err.Error()) + log.Println("Unable to reach Hooker at URL: " + hookerUrl + "/events" + " err: " + err.Error()) return } diff --git a/ui/backend/uiserver/events_test.go b/ui/backend/uiserver/events_test.go index d1395d6..ffe9496 100644 --- a/ui/backend/uiserver/events_test.go +++ b/ui/backend/uiserver/events_test.go @@ -26,13 +26,13 @@ func TestUiServer_getEvents(t *testing.T) { { "SigMetadata":{ "ID":"TRC-2", - "hostname":"postee-0" + "hostname":"hooker-0" } }, { "SigMetadata":{ "ID":"TRC-3", - "hostname":"postee-0" + "hostname":"hooker-0" } } ]`)) @@ -41,20 +41,20 @@ func TestUiServer_getEvents(t *testing.T) { { "SigMetadata":{ "ID":"TRC-2", - "hostname":"postee-0" + "hostname":"hooker-0" } }, { "SigMetadata":{ "ID":"TRC-3", - "hostname":"postee-0" + "hostname":"hooker-0" } } ]`, expectedStatusCode: http.StatusOK, }, { - name: "sad path, no postee url set", + name: "sad path, no hooker url set", expectedStatusCode: http.StatusBadRequest, }, } @@ -65,9 +65,9 @@ func TestUiServer_getEvents(t *testing.T) { ts := httptest.NewServer(tc.tsHandlerFunc) defer ts.Close() - require.NoError(t, os.Setenv("POSTEE_UI_UPDATE_URL", ts.URL)) + require.NoError(t, os.Setenv("HOOKER_UI_UPDATE_URL", ts.URL)) defer func() { - _ = os.Unsetenv("POSTEE_UI_UPDATE_URL") + _ = os.Unsetenv("HOOKER_UI_UPDATE_URL") }() } diff --git a/ui/backend/uiserver/plgnstats.go b/ui/backend/uiserver/plgnstats.go index 0a1973f..bdf1e3e 100644 --- a/ui/backend/uiserver/plgnstats.go +++ b/ui/backend/uiserver/plgnstats.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net/http" - "github.com/aquasecurity/postee/ui/backend/dbservice" + "github.com/khulnasoft-lab/hooker/ui/backend/dbservice" ) func (srv *uiServer) plgnStats(w http.ResponseWriter, r *http.Request) { diff --git a/ui/backend/uiserver/server.go b/ui/backend/uiserver/server.go index 146a4ca..7234cd4 100644 --- a/ui/backend/uiserver/server.go +++ b/ui/backend/uiserver/server.go @@ -64,12 +64,12 @@ func Instance(webLocalPath, port, cfg, webhookUrl, admusr string, admpwd string) } func (srv *uiServer) Start() { - log.Print("UI Postee server starting...") + log.Print("UI Hooker server starting...") http.ListenAndServe(":"+srv.port, srv.router) } func (srv *uiServer) Stop() { - log.Print("UI Postee server stopped!") + log.Print("UI Hooker server stopped!") } func (ctx *uiServer) pingHandler(w http.ResponseWriter, r *http.Request) { diff --git a/ui/backend/uiserver/testplg.go b/ui/backend/uiserver/testplg.go index e37d6ed..05a7210 100644 --- a/ui/backend/uiserver/testplg.go +++ b/ui/backend/uiserver/testplg.go @@ -7,8 +7,8 @@ import ( "log" "net/http" - "github.com/aquasecurity/postee/v2/layout" - "github.com/aquasecurity/postee/v2/router" + "github.com/khulnasoft-lab/hooker/v2/layout" + "github.com/khulnasoft-lab/hooker/v2/router" ) func (srv *uiServer) testSettings(w http.ResponseWriter, r *http.Request) { @@ -31,8 +31,8 @@ func (srv *uiServer) testSettings(w http.ResponseWriter, r *http.Request) { testPayload := make(map[string]string) - testPayload["title"] = "Postee test title" - testPayload["description"] = layout.GenTestDescription(plg.GetLayoutProvider(), "Postee test description") + testPayload["title"] = "Hooker test title" + testPayload["description"] = layout.GenTestDescription(plg.GetLayoutProvider(), "Hooker test description") log.Printf("description is: %s \n", testPayload["description"]) diff --git a/ui/frontend/README.md b/ui/frontend/README.md index 34dda87..5aac25b 100644 --- a/ui/frontend/README.md +++ b/ui/frontend/README.md @@ -1,4 +1,4 @@ -# postee-ui +# hooker-ui ## Project setup ``` diff --git a/ui/frontend/package-lock.json b/ui/frontend/package-lock.json index 4ccd596..12283cd 100644 --- a/ui/frontend/package-lock.json +++ b/ui/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "postee-ui", + "name": "hooker-ui", "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "postee-ui", + "name": "hooker-ui", "version": "0.2.0", "dependencies": { "axios": "^0.21.1", diff --git a/ui/frontend/package.json b/ui/frontend/package.json index cc51f94..88a91f9 100644 --- a/ui/frontend/package.json +++ b/ui/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "postee-ui", + "name": "hooker-ui", "version": "0.2.0", "private": true, "scripts": { diff --git a/ui/frontend/public/postee.jpeg b/ui/frontend/public/hooker.jpeg similarity index 100% rename from ui/frontend/public/postee.jpeg rename to ui/frontend/public/hooker.jpeg diff --git a/ui/frontend/public/postee_new.svg b/ui/frontend/public/hooker_new.svg similarity index 100% rename from ui/frontend/public/postee_new.svg rename to ui/frontend/public/hooker_new.svg diff --git a/ui/frontend/src/App.vue b/ui/frontend/src/App.vue index 57bc6aa..4d28e90 100644 --- a/ui/frontend/src/App.vue +++ b/ui/frontend/src/App.vue @@ -2,7 +2,7 @@
- Postee + Hooker
@@ -154,7 +154,7 @@ export default { }, { target: "", - content: `You did it! Browse full docs at: Postee Docs` + content: `You did it! Browse full docs at: Hooker Docs` } ] }; diff --git a/ui/frontend/src/components/ActionDetails.vue b/ui/frontend/src/components/ActionDetails.vue index da979c1..7451b5c 100644 --- a/ui/frontend/src/components/ActionDetails.vue +++ b/ui/frontend/src/components/ActionDetails.vue @@ -522,7 +522,7 @@ export default { errors: {}, //required for mixins actionType: "", //stored separately to track dependencies jiraAssigneeDescription: - 'Optional: comma separated list of users (emails) that will be assigned to ticket, e.g., ["john@yahoo.com"]. To assign a ticket to the Application Owner email address (as defined in Aqua Application Scope, owner email field), specify ["<%application_scope_owner%>"] as the assignee value', + 'Optional: comma separated list of users (emails) that will be assigned to ticket, e.g., ["john@yahoo.com"]. To assign a ticket to the Application Owner email address (as defined in Khulnasoft Application Scope, owner email field), specify ["<%application_scope_owner%>"] as the assignee value', selectedExecInputParam: 'script', }; }, diff --git a/ui/frontend/src/components/Actions.vue b/ui/frontend/src/components/Actions.vue index 7ee339d..8894465 100644 --- a/ui/frontend/src/components/Actions.vue +++ b/ui/frontend/src/components/Actions.vue @@ -4,7 +4,7 @@ Add Action

Actions

-
An Action is a enforceable step that enables the Postee operator to act upon incoming events.
+
An Action is a enforceable step that enables the Hooker operator to act upon incoming events.

Events

-
All incoming events that Postee has received so far.
+
All incoming events that Hooker has received so far.

Settings

-
Modify current Postee settings.
+
Modify current Hooker settings.
@@ -19,11 +19,11 @@ :inputHandler="updateField" /> Jira Use Postee v1 renderersUse Hooker v1 renderers
diff --git a/ui/frontend/src/store/store.js b/ui/frontend/src/store/store.js index bfdaa90..94399c3 100644 --- a/ui/frontend/src/store/store.js +++ b/ui/frontend/src/store/store.js @@ -40,7 +40,7 @@ export default new Vuex.Store({ // console.log(data.rules) const settings = { name: data.name, - AquaServer: data.AquaServer, + KhulnasoftServer: data.KhulnasoftServer, Delete_Old_Data: data.Delete_Old_Data, DbVerifyInterval: data.DbVerifyInterval, Max_DB_Size: data.Max_DB_Size diff --git a/utils/cert.go b/utils/cert.go index e749803..4a1ce04 100644 --- a/utils/cert.go +++ b/utils/cert.go @@ -64,7 +64,7 @@ func generateCertificate(hosts []string, keyFile string, certFile string) error template := x509.Certificate{ SerialNumber: serialNumber, Subject: pkix.Name{ - Organization: []string{"Aquasec"}, + Organization: []string{"Khulnasoft"}, }, NotBefore: notBefore, NotAfter: notAfter, diff --git a/utils/utils.go b/utils/utils.go index 10a4345..9cd8349 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -21,10 +21,10 @@ func GetEnvironmentVarOrPlain(value string) string { } func InitDebug() { - if os.Getenv("AQUAALERT_DEBUG") != "" { + if os.Getenv("KHULNASOFTALERT_DEBUG") != "" { dbg = true } - if os.Getenv("POSTEE_DEBUG") != "" { + if os.Getenv("HOOKER_DEBUG") != "" { dbg = true } } diff --git a/webserver/reload.go b/webserver/reload.go index c7427c2..d92094e 100644 --- a/webserver/reload.go +++ b/webserver/reload.go @@ -3,7 +3,7 @@ package webserver import ( "net/http" - "github.com/aquasecurity/postee/v2/router" + "github.com/khulnasoft-lab/hooker/v2/router" ) func (web *WebServer) reload(w http.ResponseWriter, r *http.Request) { diff --git a/webserver/tenant.go b/webserver/tenant.go index 22eaf1c..d320593 100644 --- a/webserver/tenant.go +++ b/webserver/tenant.go @@ -5,8 +5,8 @@ import ( "log" "net/http" - "github.com/aquasecurity/postee/v2/router" - "github.com/aquasecurity/postee/v2/utils" + "github.com/khulnasoft-lab/hooker/v2/router" + "github.com/khulnasoft-lab/hooker/v2/utils" "github.com/gorilla/mux" ) diff --git a/webserver/webserver.go b/webserver/webserver.go index 4236c7a..1756728 100644 --- a/webserver/webserver.go +++ b/webserver/webserver.go @@ -10,9 +10,9 @@ import ( "strings" "sync" - "github.com/aquasecurity/postee/v2/dbservice" - "github.com/aquasecurity/postee/v2/router" - "github.com/aquasecurity/postee/v2/utils" + "github.com/khulnasoft-lab/hooker/v2/dbservice" + "github.com/khulnasoft-lab/hooker/v2/router" + "github.com/khulnasoft-lab/hooker/v2/utils" "github.com/gorilla/mux" ) @@ -66,12 +66,12 @@ func (ctx *WebServer) Start(host, tlshost string) { } } - if os.Getenv("AQUAALERT_CERT_PEM") != "" { - certPem = os.Getenv("AQUAALERT_CERT_PEM") + if os.Getenv("KHULNASOFTALERT_CERT_PEM") != "" { + certPem = os.Getenv("KHULNASOFTALERT_CERT_PEM") } - if os.Getenv("AQUAALERT_KEY_PEM") != "" { - keyPem = os.Getenv("AQUAALERT_KEY_PEM") + if os.Getenv("KHULNASOFTALERT_KEY_PEM") != "" { + keyPem = os.Getenv("KHULNASOFTALERT_KEY_PEM") } err := dbservice.EnsureApiKey() if err != nil { @@ -122,7 +122,7 @@ func (ctx *WebServer) scanHandler(w http.ResponseWriter, r *http.Request) { } func (ctx *WebServer) pingHandler(w http.ResponseWriter, r *http.Request) { - ctx.writeResponse(w, http.StatusOK, "Postee alive!") + ctx.writeResponse(w, http.StatusOK, "Hooker alive!") } func (ctx *WebServer) writeResponse(w http.ResponseWriter, httpStatus int, v interface{}) { diff --git a/webserver/webserver_test.go b/webserver/webserver_test.go index 3f4f668..736e3a2 100644 --- a/webserver/webserver_test.go +++ b/webserver/webserver_test.go @@ -6,14 +6,14 @@ import ( "net/http/httptest" "testing" - "github.com/aquasecurity/postee/v2/router" + "github.com/khulnasoft-lab/hooker/v2/router" "github.com/stretchr/testify/assert" ) func TestWebServer_eventsHandler(t *testing.T) { rtr := router.Instance() - rtr.Send([]byte(`{"SigMetadata":{"ID":"TRC-2", "hostname":"postee-0"}}`)) - rtr.Send([]byte(`{"SigMetadata":{"ID":"TRC-3", "hostname":"postee-0"}}`)) + rtr.Send([]byte(`{"SigMetadata":{"ID":"TRC-2", "hostname":"hooker-0"}}`)) + rtr.Send([]byte(`{"SigMetadata":{"ID":"TRC-3", "hostname":"hooker-0"}}`)) ws := WebServer{} w := httptest.NewRecorder() @@ -30,13 +30,13 @@ func TestWebServer_eventsHandler(t *testing.T) { { "SigMetadata":{ "ID":"TRC-2", - "hostname":"postee-0" + "hostname":"hooker-0" } }, { "SigMetadata":{ "ID":"TRC-3", - "hostname":"postee-0" + "hostname":"hooker-0" } } ]`, string(got))