File tree Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ All notable changes to this GitHub action will be documented in this file.
3
3
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) .
5
5
6
- ## [ Unreleased]
6
+ ## [ 0.5.1] - 2023-07-05
7
+ ### Fixed
8
+ - Check issues with authenticated user. [ #66 ] ( https://github.com/zaproxy/action-full-scan/issues/66 )
7
9
8
10
## [ 0.5.0] - 2023-06-29
9
11
@@ -40,7 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
40
42
41
43
First release to Marketplace.
42
44
43
- [ Unreleased ] : https://github.com/zaproxy/action-api -scan/compare/v0.5.0...HEAD
45
+ [ 0.5.1 ] : https://github.com/zaproxy/action-full -scan/compare/v0.5.0...v0.5.1
44
46
[ 0.5.0 ] : https://github.com/zaproxy/action-full-scan/compare/v0.4.0...v0.5.0
45
47
[ 0.4.0 ] : https://github.com/zaproxy/action-full-scan/compare/v0.3.0...v0.4.0
46
48
[ 0.3.0 ] : https://github.com/zaproxy/action-full-scan/compare/v0.2.0...v0.3.0
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ if it identifies any alerts. Set this option to `true` if you want to fail the s
64
64
```
65
65
steps:
66
66
- name: ZAP Scan
67
- uses: zaproxy/action-full-scan@v0.5.0
67
+ uses: zaproxy/action-full-scan@v0.5.1
68
68
with:
69
69
target: 'https://www.zaproxy.org/'
70
70
```
84
84
with:
85
85
ref: master
86
86
- name: ZAP Scan
87
- uses: zaproxy/action-full-scan@v0.5.0
87
+ uses: zaproxy/action-full-scan@v0.5.1
88
88
with:
89
89
token: ${{ secrets.GITHUB_TOKEN }}
90
90
docker_name: 'owasp/zap2docker-stable'
Original file line number Diff line number Diff line change @@ -8081,11 +8081,17 @@ const actionCommon = {
8081
8081
create_new_issue = true;
8082
8082
}
8083
8083
else {
8084
+ let login = "github-actions[bot]";
8085
+ try {
8086
+ login = (await octokit.users.getAuthenticated()).data.login;
8087
+ }
8088
+ catch (e) {
8089
+ console.log(`Using ${login} to serch for issues.`);
8090
+ }
8084
8091
// Sometimes search API returns recently closed issue as an open issue
8085
8092
for (let i = 0; i < issues.data.items.length; i++) {
8086
8093
const issue = issues.data.items[i];
8087
- if (issue["state"] === "open" &&
8088
- issue["user"]["login"] === "github-actions[bot]") {
8094
+ if (issue["state"] === "open" && issue["user"]["login"] === login) {
8089
8095
openIssue = issue;
8090
8096
break;
8091
8097
}
@@ -8108,7 +8114,7 @@ const actionCommon = {
8108
8114
let lastBotComment;
8109
8115
const lastCommentIndex = comments["data"].length - 1;
8110
8116
for (let i = lastCommentIndex; i >= 0; i--) {
8111
- if (comments["data"][i]["user"]["login"] === "github-actions[bot]" ) {
8117
+ if (comments["data"][i]["user"]["login"] === login ) {
8112
8118
lastBotComment = comments["data"][i];
8113
8119
break;
8114
8120
}
Original file line number Diff line number Diff line change 23
23
"dependencies" : {
24
24
"@actions/core" : " ^1.10.0" ,
25
25
"@actions/exec" : " ^1.1.1" ,
26
- "@zaproxy/actions-common-scans" : " ^1.0.0 " ,
26
+ "@zaproxy/actions-common-scans" : " ^1.0.2 " ,
27
27
"lodash" : " ^4.17.21"
28
28
},
29
29
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments