-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve API Documentation #439
Comments
You mean we should document these in the man pages? Yes, I agree. Please report them as issues, or append them to this issue. thanks, |
I've observed that some security rules are absent from the documentation. For the security rule "parameters must not be NULL," its omission in the documentation can lead to significant security issues. Firstly, while best programming practices dictate that developers should avoid passing NULL parameters to an API, this guideline may not be obvious to less experienced developers, increasing the risk of overlooking necessary security checks. Secondly, many APIs receive parameters from other functions or APIs, which might not be adequately checked for NULL, posing a risk even for experienced developers. Therefore, it is crucial to explicitly mention in the documentation that NULL checks must be conducted on specified parameters before an API is used. Including these security rules will help developers identify potential security issues more effectively during testing. I will provide a list of APIs requiring checks along with their corresponding parameters:
|
There are other types of security rules that are missing in the documentation. I believe incorporating these rules could help developers learn how to correctly use APIs and reduce the risk of security issues. I will provide a table describing the missing security rules:
|
Hi, I'm not sure how to submit patches to supplement the documentation, so I'll provide some types of rules I've written based on other documentations. I'm not certain if they are appropriate, and if you find them acceptable, I can provide additional rules for other APIs in the same manner. |
Some of your observations should be obvious to a programmer using a C API, some of them are wrong, as they are even contradicted by the existing documentation. I've added a note to libzip(3) that NULL pointers are not allowed unless explicitly documented, which is the general rule for C APIs. |
Hi, I've observed that some security rules are absent from the documentation, such as for API
zip_fclose
, which requires that Caller MUST NOT use thezf
parameter after callingzip_fclose
. Omitting these rules could result in overlooked necessary checks when using the API. Should I report these types of rules to your team?The text was updated successfully, but these errors were encountered: