mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
First in the generate_timestamp_metadata both "snapshot_filename" and the constant SNAPSHOT_FILENAME are used which is redundant and possibly confusing. There should be only one input for the snapshot file name. Second, when calling the generate_timestamp_metadata there are cases when "snapshot_filename" is in reality "snapshot_file_path". That's what led to the need for the addition of SNAPSHOT_FILENAME when populating the "meta" field from the TIMESTAMP_SCHEMA. For the same reason, it seems logical to me to rename snapshot_filename to snapshot_file_path and explicitly take the snapshot file name from it. Third, in the _generate_and_write_metadata function the argument "filenames" is by default None, but at the same time without check it's considered that filenames is a dictionary which has a key "snapshot". This is could be okay if the default "filenames" value was not None, but in the current situation it's easy to call "_generate_and_write_metadata" with rolename = timestamp and forget to populate the filenames dictionary. Signed-off-by: Martin Vrachev <mvrachev@vmware.com> |
||
|---|---|---|
| .. | ||
| repository_data | ||
| ssl_certs | ||
| .coveragerc | ||
| __init__.py | ||
| aggregate_tests.py | ||
| proxy_server.py | ||
| simple_https_server.py | ||
| simple_server.py | ||
| slow_retrieval_server.py | ||
| test_arbitrary_package_attack.py | ||
| test_developer_tool.py | ||
| test_download.py | ||
| test_endless_data_attack.py | ||
| test_exceptions.py | ||
| test_extraneous_dependencies_attack.py | ||
| test_formats.py | ||
| test_indefinite_freeze_attack.py | ||
| test_init.py | ||
| test_key_revocation_integration.py | ||
| test_keydb.py | ||
| test_log.py | ||
| test_mirrors.py | ||
| test_mix_and_match_attack.py | ||
| test_multiple_repositories_integration.py | ||
| test_proxy_use.py | ||
| test_replay_attack.py | ||
| test_repository_lib.py | ||
| test_repository_tool.py | ||
| test_roledb.py | ||
| test_root_versioning_integration.py | ||
| test_sig.py | ||
| test_slow_retrieval_attack.py | ||
| test_tutorial.py | ||
| test_unittest_toolbox.py | ||
| test_updater.py | ||
| test_updater_root_rotation_integration.py | ||