Skip to content

Commit d0bb0d8

Browse files
committed
Merge branch 'release-1.2.0' into master
2 parents 51d29b8 + 5b0a9a3 commit d0bb0d8

File tree

12 files changed

+705
-33
lines changed

12 files changed

+705
-33
lines changed

CHANGES.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Change Log
2+
3+
Summary of the changes done in each version.
4+
5+
## 1.2.0 (2017-03-29)
6+
7+
### Updated APIs
8+
9+
- Core APIs updated for ZAP version 2.6.0.
10+
- AJAX Spider API
11+
- Allows to obtain the full results of a scan, messages in/out of scope and message with I/O errors.
12+
13+
## 1.1.1 (2017-03-09)
14+
15+
### Bug Fixes
16+
- Fixed a bug that prevented the new API methods (that don't require the API key) from being used with ZAP versions <= 2.5.0.
17+
18+
## 1.1.0 (2017-03-09)
19+
20+
### Enhancements
21+
- The `ClientApi` now allows to set the API key through the constructor, which ensures that the API key is sent whenever required. The API methods that allowed to pass the API key were deprecated in favour of using the new constructor.
22+
- It's now possible to specify the API key in all Ant tasks.
23+
- It's now possible to obtain the keys of the values of an `ApiResponseSet` (also, deprecated unused/unnecessary constructor and method).
24+
- The `Alert` now exposes the alert ID, message ID and scanner ID.
25+
- Added confidence "False Positive" (enum `Alert.Confidence`).
26+
- `Alert` and `AlertTask` now use `name` instead of `alert` for the name of the alert (zaproxy/zaproxy#1341), older methods were deprecated.
27+
28+
### Bug Fixes
29+
- `ApiResponseSet` now has as values `ApiResponse` (zaproxy/zaproxy#3228).
30+
31+
### New APIs
32+
33+
- Context Alert Filters API, for more information refer to the help page: https://github.com/zaproxy/zap-extensions/wiki/HelpAddonsAlertFiltersAlertFilter
34+
35+
### Updated APIs
36+
37+
- AJAX Spider API
38+
- Allows to scan a context, as a user and just a subtree.
39+
- Selenium API
40+
- Allows to choose which Firefox binary is used and set the path to geckodriver.
41+
42+
## 1.0.0 (2016-06-03)
43+
44+
First version as "stand alone library", it was migrated from the [zaproxy repository](https://github.com/zaproxy/zaproxy) and released to Maven Central.

README.md

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ can be obtained from [Maven Central](http://search.maven.org/) with following co
1717

1818
* GroupId: `org.zaproxy`
1919
* ArtifactId: `zap-clientapi`
20-
* Version: `1.0.0`
20+
* Version: `1.2.0`
2121

2222
Previous releases are also available, more details can be found in [Maven Central](http://search.maven.org/#search|ga|1|org.zaproxy).
2323

@@ -31,3 +31,104 @@ For help using OWASP ZAP API refer to:
3131
## Issues
3232

3333
To report issues related to OWASP ZAP API, bugs and enhancements requests, use the [issue tracker of the main OWASP ZAP project](https://github.com/zaproxy/zaproxy/issues).
34+
35+
## Building
36+
37+
This project uses Gradle to build its libraries, for example, running:
38+
39+
./gradlew build
40+
41+
in the main directory of the project will build all the libraries. The libraries will be located in the `build/libs` directory
42+
of each subproject.
43+
44+
### Installing
45+
46+
To install the artifacts to the local Maven repository you can run the following:
47+
48+
./gradlew install
49+
50+
The installed artifacts (`zap-clientapi`) are then available for other (local) projects to use.
51+
52+
## Releasing
53+
54+
In the following sections it will be explained the steps necessary to release a new version of the libraries. In all steps the
55+
version to be released is referred to as `<version-to-release>`, which should be replaced with appropriate version number
56+
(e.g. 2.1.0).
57+
58+
### Release Branching
59+
60+
The project follows the [git-flow branching model](http://nvie.com/posts/a-successful-git-branching-model/). To release a new version it needs to be created a new release branch, update the version, and tag:
61+
1. Create a release branch:
62+
`git checkout -b release-<version-to-release> develop`;
63+
2. Update version in:
64+
1. `build.gradle` file (e.g. remove `-SNAPSHOT`);
65+
2. source code (e.g. `@since` and `@deprecated` JavaDoc tags);
66+
3. `README.md` file (in `How to Obtain` section);
67+
3. Review that everything is correct and commit the changes:
68+
`git commit -S -m "Bump version number to <version-to-release>"`
69+
4. Checkout `master` and merge the release branch:
70+
1. `git checkout master`
71+
2. `git merge -S --no-ff release-<version-to-release> -m "Merge branch 'release-<version-to-release>' into master"`
72+
5. Tag the new version:
73+
`git tag -s v<version-to-release> -m "Version <version-to-release>"`
74+
75+
Reintegrate the changes into `develop` branch:
76+
1. Checkout develop branch:
77+
`git checkout develop`
78+
2. Merge the `release-<version-to-release>` branch:
79+
`git merge -S --no-ff release-<version-to-release> -m "Merge branch 'release-<version-to-release>' into develop"`
80+
1. Resolve possible conflicts;
81+
1. The version can be bumped to the next developing version (e.g. increase the minor version and add `-SNAPSHOT`);
82+
2. Continue with the merge (if the version was bumped mention it in the commit message);
83+
3. Bump to the next developing version now (e.g. increase the minor version and add `-SNAPSHOT`), if not done during the merge:
84+
`git commit -S -m "Bump version number to <developing-version>-SNAPSHOT"`
85+
86+
Delete the release branch:
87+
88+
git branch -d release-<version-to-release>
89+
90+
Push the branches (`develop` and `master`) and tag:
91+
92+
git push upstream develop master v<version-to-release>
93+
94+
(Assuming `upstream` is the zaproxy repo.)
95+
96+
### Build for Release
97+
98+
Checkout the tagged version:
99+
100+
git checkout v<version-to-release>
101+
102+
Create the the artifacts/libraries necessary for the release:
103+
104+
./gradlew clean build uberJar
105+
106+
### Release to Maven Central
107+
108+
To upload the built artifacts to OSSRH you can run the following:
109+
110+
./gradlew uploadArchives
111+
112+
Once uploaded continue with the release process in OSSRH:
113+
http://central.sonatype.org/pages/releasing-the-deployment.html
114+
115+
NOTE: The following properties must be defined (e.g. in file `GRADLE_HOME/gradle.properties` ) to successfully sign and
116+
upload the artifacts:
117+
- `signing.keyId` - the ID of the GPG key, used to sign the artifacts;
118+
- `ossrhUsername` - the OSSRH username;
119+
- `ossrhPassword` - the OSSRH password for above username.
120+
121+
Also, the user must have permissions to upload to GroupId `org.zaproxy`.
122+
123+
### GitHub Release
124+
125+
Release in GitHub:
126+
1. Draft a [new release](https://github.com/zaproxy/zap-api-java/releases/new):
127+
- Tag: `v<version-to-release>`
128+
- Title: `Version <version-to-release>`
129+
- Description: (Add a summary of the changes done in the new version and mention the artifacts/libraries available.)
130+
2. Upload the libraries:
131+
- `zap-api-<version-to-release>.jar`
132+
- `zap-clientapi-<version-to-release>.jar`
133+
- `zap-clientapi-ant-<version-to-release>.jar`
134+
3. Publish release.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ allprojects {
1010
apply plugin: 'java'
1111
group = 'org.zaproxy'
1212

13-
version '1.1.1'
13+
version '1.2.0'
1414
ext.versionBC = '1.0.0'
1515

1616
repositories {

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/gen/Acsrf.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ public Acsrf(ClientApi api) {
4141
}
4242

4343
/**
44-
* Lists the names of all anti CSRF tokens
44+
* Lists the names of all anti-CSRF tokens
4545
*/
4646
public ApiResponse optionTokensNames() throws ClientApiException {
4747
return api.callApi("acsrf", "view", "optionTokensNames", null);
4848
}
4949

5050
/**
51-
* Adds an anti CSRF token with the given name, enabled by default
51+
* Adds an anti-CSRF token with the given name, enabled by default
5252
*/
5353
public ApiResponse addOptionToken(String string) throws ClientApiException {
5454
Map<String, String> map = new HashMap<>();
@@ -57,7 +57,7 @@ public ApiResponse addOptionToken(String string) throws ClientApiException {
5757
}
5858

5959
/**
60-
* Removes the anti CSRF token with the given name
60+
* Removes the anti-CSRF token with the given name
6161
*/
6262
public ApiResponse removeOptionToken(String string) throws ClientApiException {
6363
Map<String, String> map = new HashMap<>();
@@ -66,7 +66,7 @@ public ApiResponse removeOptionToken(String string) throws ClientApiException {
6666
}
6767

6868
/**
69-
* Generate a form for testing lack of anti CSRF tokens - typically invoked via ZAP
69+
* Generate a form for testing lack of anti-CSRF tokens - typically invoked via ZAP
7070
*/
7171
public byte[] genForm(String hrefid) throws ClientApiException {
7272
Map<String, String> map = new HashMap<>();

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/gen/AjaxSpider.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ public ApiResponse numberOfResults() throws ClientApiException {
6868
return api.callApi("ajaxSpider", "view", "numberOfResults", null);
6969
}
7070

71+
/**
72+
* This component is optional and therefore the API will only work if it is installed
73+
*/
74+
public ApiResponse fullResults() throws ClientApiException {
75+
return api.callApi("ajaxSpider", "view", "fullResults", null);
76+
}
77+
7178
/**
7279
* This component is optional and therefore the API will only work if it is installed
7380
*/

0 commit comments

Comments
 (0)