Skip to content
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

Revise input checks in API functions #371

Open
lukpueh opened this issue Jun 24, 2020 · 0 comments
Open

Revise input checks in API functions #371

lukpueh opened this issue Jun 24, 2020 · 0 comments

Comments

@lukpueh
Copy link
Member

lukpueh commented Jun 24, 2020

Description of issue or feature request:

While reviewing #364 I realized that we don't visibly sanitize all arguments at the top of all of our interface functions. This might be because we trust the internal functions, to which the interface functions in many cases pass the arguments on, to take care of malformed arguments.

I suggest to use our schema checker facility on all arguments of the public facing functions to fail early (also see secure-systems-lab/securesystemslib#183), especially in the light of #369, which officially defines our public API.

Current behavior:
Not all API functions sanitize all passed arguments at the user boundary.

Expected behavior:
Revise API / public-facing functions and add schema checkers for all arguments at the top, to fail early (or add comment where not feasible/desirable).
Revise internal non-public facing functions if some argument sanitization can be removed

See https://in-toto.readthedocs.io/en/latest/api.html and https://in-toto.readthedocs.io/en/latest/model.html for a list of all public facing functions and methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant