Skip to content

Commit

Permalink
Fix Nextcloud-Whitelist: false-positive when opening the trashbin cro…
Browse files Browse the repository at this point in the history
…wdsecurity#1086  (crowdsecurity#1087)

* Update nextcloud-whitelist.yaml

Fix crowdsecurity#1086

* enhance: Add new test case based on whitelist changes

* enhance: manually run index workflow cause fork

---------

Co-authored-by: Laurence <[email protected]>
  • Loading branch information
florianwgnr and LaurenceJJones authored Aug 21, 2024
1 parent 5041166 commit 21e221b
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .index.json
Original file line number Diff line number Diff line change
Expand Up @@ -7304,7 +7304,7 @@
"crowdsecurity/nextcloud-whitelist": {
"path": "parsers/s02-enrich/crowdsecurity/nextcloud-whitelist.yaml",
"stage": "s02-enrich",
"version": "0.8",
"version": "0.9",
"versions": {
"0.1": {
"digest": "7685c823a398a711b76afea742ebeb2637ac55c829eafba841b63504b1e2228e",
Expand Down Expand Up @@ -7337,10 +7337,14 @@
"0.8": {
"digest": "92408f18443f074036c7eb1d3b948b452f8e29e9ba2b2fca2e118cb98437f4e0",
"deprecated": false
},
"0.9": {
"digest": "abb7cfd6a77a94a9c7347065ccbb3964408e51d4d58b3092f009abb65c2cb579",
"deprecated": false
}
},
"long_description": "IyMgTmV4dGNsb3VkIHdoaXRlbGlzdAoKIyMjIENvbnRhY3RzIGFwcApDb250YWN0cyBoYXMgYW4gaXNzdWUgd2l0aCBleGNlc3NpdmUgNDA0IHJlc3BvbnNlIGNvZGVzIHdoZW4gYSB1c2VyIGltYWdlIGlzIG1pc3NpbmcKW1Vwc3RyZWFtIGlzc3VlXShodHRwczovL2dpdGh1Yi5jb20vbmV4dGNsb3VkL2NvbnRhY3RzL2lzc3Vlcy8zMDIxKQoKLS0tCiMjIyBQaG90b3MgYXBwCk9uIGZpcnN0IGxvYWQgdGhlIHBob3RvcyBhcHAgY2FsbHMgYSBwcmV2aWV3IGVuZHBvaW50LCBob3dldmVyLCBpZiBpdCBmYWlscyB0by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BsZSBpbWFnZXMgaW5zaWRlIE5leHRjbG91ZCBQaG90b3MsIEhUVFAgQ3Jhd2wgbm9uIHN0YXRpY3MgaXMgdHJpZ2dlcmVkIHNpbmNlIHRoZSBpbWFnZXMgbG9vayBsaWtlIGR5bmFtaWMgYXNzZXRzLgogICAtIGV2dC5NZXRhLmh0dHBfc3RhdHVzID09ICc0MDQnICYmIGV2dC5NZXRhLmh0dHBfdmVyYiA9PSAnR0VUJyAmJiBldnQuUGFyc2VkLnJlcXVlc3QgPT0gJy9vY3MvdjIucGhwL2FwcHMvdGV4dC93b3Jrc3BhY2UnICYmIGV2dC5QYXJzZWQuaHR0cF9hcmdzIGNvbnRhaW5zICdwYXRoPSUyRicgI1doZW4gb3BlbmluZyBmb2xkZXJzIGluIE5leHRjbG91ZCBGaWxlcyB0aGF0IGRvbid0IGNvbnRhaW4gYSByZWFkbWUubWQgNDA0IGVycm9yIGlzIHRocm93bgogICAtIGV2dC5NZXRhLmh0dHBfc3RhdHVzID09ICc0MDQnICYmIGV2dC5NZXRhLmh0dHBfdmVyYiA9PSAnR0VUJyAmJiBldnQuTWV0YS5odHRwX3BhdGggY29udGFpbnMgJy9hcHBzL2ZpbGVzX3RyYXNoYmluL3ByZXZpZXcnICYmIGV2dC5QYXJzZWQuaHR0cF9hcmdzIGNvbnRhaW5zICdmaWxlSWQ9JyAjIDQwNCBlcnJvciB0aHJvd24gd2hlbiBwcmV2aWV3IGlzIG1pc3NpbmcgZm9yIGZpbGVzIGluIHRyYXNoIGJpbgogICAtIGV2dC5NZXRhLmh0dHBfc3RhdHVzID09ICc0MDQnICYmIGV2dC5NZXRhLmh0dHBfdmVyYiA9PSAnR0VUJyAmJiBldnQuTWV0YS5odHRwX3BhdGggbWF0Y2hlcyAnXFwvYXBwc1xcL2ZpbGVzXFwvYXBpXFwvdjFcXC90aHVtYm5haWxcXC8oXFxkKykvKFxcZCspJwo=",
"description": "Whitelist events from nextcloud",
"author": "crowdsecurity",
"labels": null
Expand Down
3 changes: 2 additions & 1 deletion .tests/nextcloud-whitelist/nextcloud-whitelist.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
192.168.1.1 - - [07/Oct/2022:00:01:18 +0200] "GET /remote.php/dav/addressbooks/users/crowdsec/bvf-panilor/14FF37C0-C83C-4CB5-9091-269A9337D362.vcf?photo HTTP/2.0" 404 20 "https://myapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0"
192.168.1.1 - - [07/Oct/2022:00:01:25 +0200] "GET /index.php/apps/mail/api/avatars/url/noreply%40test.fr HTTP/2.0" 404 20 "https://myapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0"
192.168.1.1 - - [07/Oct/2022:00:01:25 +0200] "GET /apps/mail/api/avatars/url/noreply%40test.fr HTTP/2.0" 404 20 "https://myapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0"
192.168.1.1 - - [07/Oct/2022:00:01:25 +0200] "GET /apps/mail/api/avatars/url/noreply%40test.fr HTTP/2.0" 404 20 "https://myapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0"
192.168.1.1 - - [06/Aug/2024:20:58:42 +0200] "GET /apps/files_trashbin/preview?fileId=1331569&x=32&y=32&mimeFallback=true&a=0 HTTP/2.0" 404 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
Loading

0 comments on commit 21e221b

Please sign in to comment.