... | ... | @@ -68,146 +68,4 @@ There is also a [Pull Request](https://github.com/pwndoc/pwndoc/pull/281) that a |
|
|
|
|
|
## Known problems
|
|
|
|
|
|
### Newlines are being added during report processing
|
|
|
|
|
|
Note: **Fixing this is a priority.**
|
|
|
|
|
|
### Clicking Save on audit deletes list of open ports
|
|
|
|
|
|
Current workaround:
|
|
|
|
|
|
There is a debug action which can re-upload the open ports to the audit.
|
|
|
|
|
|
Potential future solution:
|
|
|
|
|
|
This might be solved by using the pull request with additional filters, using the filter `lines` we could have a custom section that would be more persistent, than the current audit `scope` attribute.
|
|
|
|
|
|
|
|
|
### ~~Audits with Czech characters in title can't be downloaded~~
|
|
|
|
|
|
There is a [PR](https://github.com/pwndoc/pwndoc/pull/326) that should fix that. It is applied from our [release-2022-10-24](https://gitlab.fi.muni.cz/cybersec/tns/pwndocimportautomator/-/releases/release-2022-10-24).
|
|
|
|
|
|
There might be other fields with a similar problem, GitHub search shows regex contastraints on the [following](https://github.com/pwndoc/pwndoc/search?q=must+match), but nothing that would be visible to user seems to be restricted (and supports even Japanese characters).
|
|
|
|
|
|
- language and locale
|
|
|
- audit name (fixed) and locale
|
|
|
- audit-type name and locale (This might be used for names of analysts.)
|
|
|
- vulnerability-type name and locale
|
|
|
- vulnerability-category name
|
|
|
- section name and **field**
|
|
|
- custom-field name, **field**, label, fieldType
|
|
|
|
|
|
|
|
|
### Only one scan2report processing can run simultaneously
|
|
|
|
|
|
### Defining tables inside PwnDoc UI
|
|
|
|
|
|
This is currently unfeasable to do from inside PwnDoc. Only tables, which can be defined directly in the docx are supported.
|
|
|
|
|
|
This was comunicated to TNS from the very start and now is accepted as a won't do.
|
|
|
|
|
|
It is supposedly on the
|
|
|
[roadmap](https://github.com/pwndoc/pwndoc/issues/75) and referenced from many other issues, but doesn't seem to be priority.
|
|
|
|
|
|
### TLS terminator / Reverse proxy and TLS Client auth
|
|
|
|
|
|
Currently there is no recommendet setting on how to place the app behind (another) reverse proxy and keep the TLS Client auth functionality.
|
|
|
|
|
|
### ignore_pluginoutput is being lost
|
|
|
|
|
|
Fixed in [release-2022-10-17](https://gitlab.fi.muni.cz/cybersec/tns/pwndocimportautomator/-/releases/release-2022-10-17).
|
|
|
|
|
|
### Uploads of big audits can fail inside `pwndoc-backend`
|
|
|
|
|
|
PwnDoc doesn't support extremly big audits. Some actions can silently - in API it looks like:
|
|
|
|
|
|
- `http.client.RemoteDisconnected: Remote end closed connection without response`
|
|
|
- `urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))`
|
|
|
|
|
|
There were some [attemps](https://github.com/pwndoc/pwndoc/issues/222) to fix it upstream, . I've done [partial workaround](https://github.com/BorysekOndrej/pwndoc/commit/a4f356480c01584c2676c218a18048c5270e75ac) inside PwnDoc itself and bigger workaround in the Importer. Bellow you can find some limits listed.
|
|
|
|
|
|
|
|
|
<details>
|
|
|
<summary>PwnDoc Backend error log</summary>
|
|
|
|
|
|
|
|
|
```log
|
|
|
/app/node_modules/mongodb/lib/cmap/connection.js:261
|
|
|
callback(new MongoError(document));
|
|
|
^
|
|
|
|
|
|
MongoError: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting.
|
|
|
at MessageStream.messageHandler (/app/node_modules/mongodb/lib/cmap/connection.js:261:20)
|
|
|
at MessageStream.emit (node:events:390:28)
|
|
|
at processIncomingData (/app/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
|
|
|
at MessageStream._write (/app/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
|
|
|
at writeOrBuffer (node:internal/streams/writable:389:12)
|
|
|
at _write (node:internal/streams/writable:330:10)
|
|
|
at MessageStream.Writable.write (node:internal/streams/writable:334:10)
|
|
|
at Socket.ondata (node:internal/streams/readable:754:22)
|
|
|
at Socket.emit (node:events:390:28)
|
|
|
at addChunk (node:internal/streams/readable:315:12)
|
|
|
at readableAddChunk (node:internal/streams/readable:289:9)
|
|
|
at Socket.Readable.push (node:internal/streams/readable:228:10)
|
|
|
at TCP.onStreamRead (node:internal/stream_base_commons:199:23) {
|
|
|
ok: 0,
|
|
|
errmsg: 'Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting.',
|
|
|
code: 16819,
|
|
|
codeName: 'Location16819',
|
|
|
[Symbol(mongoErrorContextSymbol)]: {}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
#### Single finding can't be more than 10 MB
|
|
|
|
|
|
Nginx in Pwndoc-Frontend has a limit for max upload size set to 10 MB in `pwndoc/frontend/.docker/nginx.conf`. Upload of findings which have bigger size will be skipped with a error message detailing that it's due to the size.
|
|
|
|
|
|
#### Audit content can't be more than 16 MB
|
|
|
|
|
|
Mongo has an internal limit on the size of single document. The following message in `pwndoc-logs/pwndoc.json` means the limit got breached, most likely during upsert of findings.
|
|
|
|
|
|
```log
|
|
|
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 && <= 17825792. Received 17825795
|
|
|
```
|
|
|
|
|
|
Technically this is true for every model inside folder `pwndoc/backend/src/models`, however it's likely Audit is going to be the only problematic one.
|
|
|
|
|
|
Images are not stored inside audit itself, they have their own document each and are only referenced (I.e. audit can contain arbitrary amount of images, each can be at most 16 MB).
|
|
|
|
|
|
|
|
|
### PwnDoc parsing problems
|
|
|
|
|
|
PwnDoc supports only subset of HTML. Importer does preprocessing to transform the HTML, but clearly there are more problems. I don't have reproducers for the following problems, that TNS encountered in their testing.
|
|
|
|
|
|
- [ ] TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Content-Disposition"]
|
|
|
- [ ] TypeError: Cannot read properties of undefined (reading 'substring')
|
|
|
|
|
|
In addition, parsing can be inside Docx template, for example:
|
|
|
|
|
|
- [ ] explanation: 'The tag "text | convertHTML" is not inside a paragraph, putting raw tags inside an inline loop is disallowed.',
|
|
|
- [ ] explanation: 'The loop with tag "findings" is unclosed',
|
|
|
- [ ] explanation: `The tag "description" is closed by the tag "#images != ''"`,
|
|
|
- [ ] explanation: `The tag "poc != ''" is closed by the tag "findings"`,
|
|
|
- [ ] explanation: `The scope parser for the tag "#images != ''" failed to compile`,
|
|
|
- [ ] explanation: `The tag "images != ''" is closed by the tag "#images != ''"`,
|
|
|
- [ ] explanation: 'The tag "image" is not inside a paragraph',
|
|
|
- [ ] explanation: 'The tag beginning with "{/" is unclosed',
|
|
|
|
|
|
### PwnDoc runs single threaded - multitasking can be problematic
|
|
|
|
|
|
For regular tasks, everything takes at most couple seconds. There are two exceptions, during which noone else can perform any actions.
|
|
|
- report generation (can take up-to couple minutes)
|
|
|
- findings import (takes up-to couple minutes, but can be slightly slowed down to allow for concurent operations)
|
|
|
|
|
|
### Saving template without name doesn't show error, but doesn't actually save
|
|
|
|
|
|
### Some formating in templates is incorrectly escaped during finding creation
|
|
|
|
|
|
Example is image tag:
|
|
|
|
|
|
```html
|
|
|
<img alt="shelly1_cookie.jpg" src="6351100d5a392b00132553fd"/>
|
|
|
``` |
|
|
Known issues are listed in a [separate file](known_issues.md). |