Skip to content

Commit

Permalink
Merge branch 'main' into vue3
Browse files Browse the repository at this point in the history
Signed-off-by: Najam Ul Saqib <[email protected]>
  • Loading branch information
njmulsqb authored Sep 13, 2023
2 parents d067795 + 143769c commit 8db3a5a
Show file tree
Hide file tree
Showing 21 changed files with 157 additions and 132 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Update displayed time format to include leading zeros (Issue 1256).

## [0.17.0] - 2023-07-11
### Changed
- Update minimum ZAP version to 2.13.0.

## [0.16.0] - 2023-01-25
### Added
Expand Down Expand Up @@ -166,7 +172,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.0] - 2018-12-03
First alpha release.

[Unreleased]: https://github.com/zaproxy/zap-hud/compare/v0.16.0...HEAD
[Unreleased]: https://github.com/zaproxy/zap-hud/compare/v0.17.0...HEAD
[0.17.0]: https://github.com/zaproxy/zap-hud/compare/v0.16.0...v0.17.0
[0.16.0]: https://github.com/zaproxy/zap-hud/compare/v0.15.0...v0.16.0
[0.15.0]: https://github.com/zaproxy/zap-hud/compare/v0.14.0...v0.15.0
[0.14.0]: https://github.com/zaproxy/zap-hud/compare/v0.13.0...v0.14.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![HUD Logo](https://raw.githubusercontent.com/zaproxy/zap-hud/main/assets/images/hud_logo_128px.png) OWASP ZAP Heads Up Display
# ![HUD Logo](https://raw.githubusercontent.com/zaproxy/zap-hud/main/assets/images/hud_logo_128px.png) ZAP Heads Up Display
![Release: Beta](https://img.shields.io/badge/release-beta-brightgreen.svg)
[![Known Vulnerabilities](https://snyk.io/test/github/zaproxy/zap-hud/badge.svg?targetFile=package.json)](https://snyk.io/test/github/zaproxy/zap-hud?targetFile=package.json)
[![CodeQL](https://github.com/zaproxy/zap-hud/actions/workflows/codeql.yml/badge.svg)](https://github.com/zaproxy/zap-hud/actions/workflows/codeql.yml)
Expand Down Expand Up @@ -29,7 +29,7 @@ The HUD is an interface that provides the functionality of ZAP **directly in the
Learn more:

* Blog: [Hacking with a Heads Up Display](https://segment.com/blog/hacking-with-a-heads-up-display/)
* Video: [The OWASP ZAP HUD - Usable Security Tooling](https://youtu.be/ztfgip-UhWw)
* Video: [The ZAP HUD - Usable Security Tooling](https://youtu.be/ztfgip-UhWw)
* Wiki: [Inside the HUD](../../wiki)

![](https://raw.githubusercontent.com/zaproxy/zap-hud/main/assets/images/hud-break.gif)
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ will create the tag, create the release, trigger the update of the marketplace,

## Localized Resources

The resources that require localization (e.g. `Messages.properties`, help pages) are uploaded to the OWASP ZAP projects in
The resources that require localization (e.g. `Messages.properties`, help pages) are uploaded to the ZAP projects in
[Crowdin](https://crowdin.com/) when the add-on is released, if required (for pre-translation) the resources can be uploaded manually at anytime
by running the workflow [Crowdin Upload Files](https://github.com/zaproxy/zap-hud/actions/workflows/crowdin-upload-files.yml).

Expand Down
33 changes: 18 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.github.gradle.node.npm.task.NpmTask
import org.zaproxy.gradle.addon.AddOnPlugin
import org.zaproxy.gradle.addon.AddOnStatus
import org.zaproxy.gradle.addon.internal.model.ProjectInfo
import org.zaproxy.gradle.addon.internal.model.ReleaseState
Expand All @@ -14,11 +15,11 @@ import org.zaproxy.gradle.tasks.ZapStart
plugins {
`java-library`
jacoco
id("org.zaproxy.add-on") version "0.8.0"
id("org.zaproxy.add-on") version "0.9.0"
id("org.zaproxy.crowdin") version "0.3.1"
id("com.diffplug.spotless") version "6.14.1"
id("com.github.ben-manes.versions") version "0.45.0"
id("com.github.node-gradle.node") version "3.5.1"
id("com.diffplug.spotless") version "6.20.0"
id("com.github.ben-manes.versions") version "0.47.0"
id("com.github.node-gradle.node") version "5.0.0"
}

apply(from = "$rootDir/gradle/compile.gradle.kts")
Expand Down Expand Up @@ -48,7 +49,7 @@ zapAddOn {
addOnName.set("HUD - Heads Up Display")
addOnStatus.set(AddOnStatus.BETA)

zapVersion.set("2.12.0")
zapVersion.set("2.13.0")

releaseLink.set("https://github.com/zaproxy/zap-hud/compare/v@[email protected]@CURRENT_VERSION@")
unreleasedLink.set("https://github.com/zaproxy/zap-hud/compare/v@[email protected]")
Expand Down Expand Up @@ -127,26 +128,28 @@ val generateI18nJsFile by tasks.creating(GenerateI18nJsFile::class) {

sourceSets["main"].output.dir(generatedI18nJsFileDir, "builtBy" to generateI18nJsFile)

tasks.named(AddOnPlugin.GENERATE_MANIFEST_TASK_NAME) {
dependsOn(copyNpmDeps)
dependsOn(generateI18nJsFile)
}

java {
val javaVersion = JavaVersion.VERSION_11
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

val jupiterVersion = "5.9.2"

dependencies {
compileOnly("org.zaproxy.addon:network:0.1.0")
compileOnly(files(fileTree("lib").files))

testImplementation("org.junit.jupiter:junit-jupiter-api:$jupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$jupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

testImplementation("io.github.bonigarcia:selenium-jupiter:4.3.2")
testImplementation("org.seleniumhq.selenium:selenium-java:4.7.2")
testImplementation("io.github.bonigarcia:selenium-jupiter:4.3.6")
testImplementation("org.seleniumhq.selenium:selenium-java:4.10.0")
testImplementation("org.hamcrest:hamcrest-all:1.3")
testImplementation("org.mockito:mockito-all:1.10.19")
testImplementation("org.mockito:mockito-core:5.4.0")
testImplementation("org.zaproxy.addon:network:0.1.0")
testImplementation(files(fileTree("lib").files))
}
Expand Down Expand Up @@ -175,7 +178,7 @@ spotless {
java {
licenseHeaderFile("gradle/spotless/license.java")

googleJavaFormat("1.7").aosp()
googleJavaFormat("1.17.0").aosp()
}

kotlinGradle {
Expand Down Expand Up @@ -248,7 +251,7 @@ tasks {

doLast {
copy {
from(zipTree(fileTree(zapDownloadDir.asFile).matching { "*.zip" }.singleFile)).eachFile {
from(zipTree(fileTree(zapDownloadDir.asFile).matching { include("*.zip") }.singleFile)).eachFile {
path = path.substring(relativePath.segments[0].length)
}
into(zapInstallDir)
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`java-gradle-plugin`
id("com.diffplug.spotless") version "6.14.1"
id("com.diffplug.spotless") version "6.20.0"
}

apply(from = "../gradle/compile.gradle.kts")
Expand All @@ -11,7 +11,7 @@ repositories {

dependencies {
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.zaproxy:zap-clientapi:1.11.0")
implementation("org.zaproxy:zap-clientapi:1.12.0")
}

java {
Expand All @@ -24,7 +24,7 @@ spotless {
java {
licenseHeaderFile("../gradle/spotless/license.java")

googleJavaFormat("1.7").aosp()
googleJavaFormat("1.17.0").aosp()
}

kotlinGradle {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=0.17.0
version=0.18.0
release=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=312eb12875e1747e05c2f81a4789902d7e4ec5defbd1eefeaccc08acf096505d
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
distributionSha256Sum=7c3ad722e9b0ce8205b91560fd6ce8296ac3eadf065672242fd73c06b8eeb6ee
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 10 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,26 +130,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,9 @@ protected String setRecordedRequest(HttpMessage request) throws URIException {
return reqUrl;
}

/** @return index of pattern in s or -1, if not found */
/**
* @return index of pattern in s or -1, if not found
*/
public static int regexEndOf(Pattern pattern, String s) {
Matcher matcher = pattern.matcher(s);
return matcher.find() ? matcher.end() : -1;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/zaproxy/zap/extension/hud/HudAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public class HudAPI extends ApiImplementor {
* real shared secret
*/
public static final String SHARED_TEST_NON_SECRET = "TEST_MODE";

/**
* Shared secret used to ensure that we only accept messages from the ZAP code running on the
* target domain
Expand Down
Loading

0 comments on commit 8db3a5a

Please sign in to comment.