)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9601,"name":"Oleh Anufriiev","email":"oanufriev@mirantis.com","username":"oanufriev"},"change_message_id":"4448d12dbd920d1b1c01f615e09455f5ced08445","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a command-dict option that instruct `_run_command_over_ssh\u0027"},{"line_number":10,"context_line":"to upload a local file specified in `local_path\u0027 key to a remote path"},{"line_number":11,"context_line":"specified in `remote_path\u0027 key and execute in on the host."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ibaa6543ef6d6c95e8b9cdab989264d56f54e8e44"},{"line_number":14,"context_line":"Implements: blueprint vm-workloads-framework"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1aca2d91_cf048019","line":11,"range":{"start_line":11,"start_character":43,"end_line":11,"end_character":45},"updated":"2015-05-09 00:02:57.000000000","message":"it","commit_id":"21ca17192bf82db3329f7520279d8c0ef9fa019b"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"4333cc42c86fb716627edc7c5011a25b4662a6e1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a command-dict option that instruct `_run_command_over_ssh\u0027"},{"line_number":10,"context_line":"to upload a local file specified in `local_path\u0027 key to a remote path"},{"line_number":11,"context_line":"specified in `remote_path\u0027 key and execute in on the host."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ibaa6543ef6d6c95e8b9cdab989264d56f54e8e44"},{"line_number":14,"context_line":"Implements: blueprint vm-workloads-framework"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1aca2d91_f5c6e666","line":11,"range":{"start_line":11,"start_character":43,"end_line":11,"end_character":45},"in_reply_to":"1aca2d91_cf048019","updated":"2015-05-09 15:38:52.000000000","message":"Thanks. But please be sure you have reviewed through the whole patchset so it won\u0027t take 100 iterations to fit it.","commit_id":"21ca17192bf82db3329f7520279d8c0ef9fa019b"}],"rally/benchmark/validation.py":[{"author":{"_account_id":8840,"name":"Carlos L. Torres","email":"carlos.torres@rackspace.com","username":"carl6796"},"change_message_id":"cc4978a39702c8436a38bf2919979e3bd2adbeef","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return ValidationResult(False, str(e))"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    for key in \"script_file\", \"local_path\":"},{"line_number":212,"context_line":"        if not command.get(key):"},{"line_number":213,"context_line":"            continue"},{"line_number":214,"context_line":"        return _file_access_ok(command[key], os.R_OK,"},{"line_number":215,"context_line":"                               param_name + \".\" + key, True)"}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_4dab518a","line":212,"updated":"2015-06-12 16:23:54.000000000","message":"Why not just use a if/elif  statements here? Seems like contrived control workflow.\n\nor if you still want to keep this, then flip the logic so it flows naturally.\n\n  ....\n  for key in \"script_file\", \"local_path\":\n      if command.get(key):\n          return _file_access_ok(command[key[, os.R_OK,\n                                 param_name + \".\" + key, True)\n\n  ....","commit_id":"5fdc72ff95327be2777bdd3a0d9769378511b6e4"},{"author":{"_account_id":8840,"name":"Carlos L. Torres","email":"carlos.torres@rackspace.com","username":"carl6796"},"change_message_id":"cc4978a39702c8436a38bf2919979e3bd2adbeef","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        if not command.get(key):"},{"line_number":213,"context_line":"            continue"},{"line_number":214,"context_line":"        return _file_access_ok(command[key], os.R_OK,"},{"line_number":215,"context_line":"                               param_name + \".\" + key, True)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    return ValidationResult(True)"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_edce7d59","line":215,"updated":"2015-06-12 16:23:54.000000000","message":"Use named arguments here, what does it mean to pass \u0027True\u0027 here?","commit_id":"5fdc72ff95327be2777bdd3a0d9769378511b6e4"}],"rally/plugins/openstack/scenarios/vm/utils.py":[{"author":{"_account_id":8840,"name":"Carlos L. Torres","email":"carlos.torres@rackspace.com","username":"carl6796"},"change_message_id":"cc4978a39702c8436a38bf2919979e3bd2adbeef","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if command.get(\"local_path\"):"},{"line_number":70,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":71,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path, 0o777)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        return ssh.execute(cmd, stdin\u003dstdin)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1af86dd1_8d1269b3","line":71,"updated":"2015-06-12 16:23:54.000000000","message":"Can we extract  \u00270o777\u0027 as a constant?","commit_id":"5fdc72ff95327be2777bdd3a0d9769378511b6e4"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"2a95aa3bb360009c88b3d6316b02c6fe8aa43df6","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.ALL_READ_WRITE_EXECUTE_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a41bdd9_2f9d4c59","line":72,"updated":"2015-07-13 15:47:05.000000000","message":"It\u0027s possible to specify a local_path with script_inline or script_file, in which case this block will overwrite the interpreter, which is almost certainly the wrong thing. I suspect that this is a validation bug -- check_command_dict should ensure that local_path is only used with remote_path, not with script_file or script_inline.","commit_id":"249bfd94747611f7b5b0b20c89c0796ee6ede636"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"fba3950cec64112cb550770a678316a448ba2369","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.ALL_READ_WRITE_EXECUTE_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a41bdd9_f6e88a12","line":72,"in_reply_to":"9a41bdd9_2f9d4c59","updated":"2015-07-15 11:08:30.000000000","message":"Ever imagine uploading the interpreter and executing the script with it?\n\nJust with:\n interpreter: \"/tmp/bin/awk\"\n local_path: \"/home/username/work/awk_cve_check/bin/awk\"\n script_inline: \"#!/tmp/bin/awk -f\\nprint \u0027Hello, World\u0027\"","commit_id":"249bfd94747611f7b5b0b20c89c0796ee6ede636"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"2a95aa3bb360009c88b3d6316b02c6fe8aa43df6","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.ALL_READ_WRITE_EXECUTE_ACCESS_MODE)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        return ssh.execute(cmd, stdin\u003dstdin)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a41bdd9_0f588831","line":75,"updated":"2015-07-13 15:47:05.000000000","message":"Why 0777? 0755 should be sufficient, and is less of a security risk.","commit_id":"249bfd94747611f7b5b0b20c89c0796ee6ede636"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"fba3950cec64112cb550770a678316a448ba2369","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.ALL_READ_WRITE_EXECUTE_ACCESS_MODE)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        return ssh.execute(cmd, stdin\u003dstdin)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a41bdd9_b683e255","line":75,"in_reply_to":"9a41bdd9_0f588831","updated":"2015-07-15 11:08:30.000000000","message":"OK.","commit_id":"249bfd94747611f7b5b0b20c89c0796ee6ede636"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"4f8914c14f9d24f672d9d9a04e70ef53e099d64c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.USER_RWX_OTHER_RX_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a41bdd9_4b7ff2aa","line":72,"updated":"2015-07-15 13:36:04.000000000","message":"You raise an interesting use case, and certainly not impossible, but I see it more likely that some well-intentioned soul misunderstands the options and does this:\n\n    interpreter: \"/bin/sh\"\n    script_file: \"/home/username/some_script.sh\"\n    local_path: \"/home/username/some_script.sh\"\n\nBye-bye, /bin/sh. I think it\u0027s a mistake to ever overwrite the interpreter; especially with your pending patchset to make it easier to create custom images on-the-fly, the interpreter should be preinstalled. Your rather prosaic example notwithstanding, I see this doing more harm than good.","commit_id":"76d62c67a08524eb7713f6538ab1be3ea4e8c009"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"acf302ffac3350efec7768637749911f8899fb56","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.USER_RWX_OTHER_RX_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a41bdd9_aad6b74c","line":72,"in_reply_to":"9a41bdd9_4b7ff2aa","updated":"2015-07-15 13:51:46.000000000","message":"I just provide you with an instance of the usage. Please look through it carefully.\n\nRegarding your security concerns: the root user (uid\u003d0) is allowed to do anything with the machine. I will not take away this from the system because this is how POSIX dictates it. UNIX is not root-fool-proof and can not be made such.\n\n\u003e the interpreter should be preinstalled\n\nPlease look at the example provided. It is not using the custom image at all. It only tests that the \u0027awk\u0027 build with the patch fixing the CVE on the developer\u0027s machine is uploaded and tested against an appropriate script, e.g. bashcheck[1] for bash.\n\n[1] https://github.com/hannob/bashcheck/blob/master/bashcheck","commit_id":"76d62c67a08524eb7713f6538ab1be3ea4e8c009"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"f88cb9af51cf599d7f41fb11a0cfdc158715bf55","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.USER_RWX_OTHER_RX_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a41bdd9_ca4d3bc5","line":72,"in_reply_to":"9a41bdd9_aad6b74c","updated":"2015-07-15 13:58:21.000000000","message":"I don\u0027t think you\u0027re following me. I didn\u0027t take issue with your example; it makes sense. I just think it\u0027s marginal -- and it\u0027s far more likely that someone will accidentally overwrite their interpreter, and we don\u0027t need to make that easier for them to do. It\u0027s not a security concern, it\u0027s usability. If a user wants to overwrite /bin/sh, fine, but we don\u0027t need to make it easy to do that accidentally.\n\nI brought up the custom image patch not because I thought your example was using it, but because it makes your example that much less necessary. You can install whatever interpreter you need in the custom image step.","commit_id":"76d62c67a08524eb7713f6538ab1be3ea4e8c009"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"f46b9209cbb55f5930ce2dfdc1b71f06970e75ab","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.USER_RWX_OTHER_RX_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a41bdd9_ed6619ba","line":72,"in_reply_to":"9a41bdd9_ca4d3bc5","updated":"2015-07-15 14:07:08.000000000","message":"\u003e If a user wants to overwrite /bin/sh, fine, but we don\u0027t need to make it easy to do that accidentally.\n\nIt is not easy to do -- user first must install Rally.\n\nIn my opinion, you are trying to make fool-proof something that is designed not to be such.\n\n\u003e You can install whatever interpreter you need in the custom image step.\n\nI don\u0027t need to install anything since I can merely upload the pre-built binary (e.g. `fio\u0027 or `bash\u0027) and skip that step. This makes the develop cycle much shorter -- I don\u0027t have to wait for a snapshot and so on.","commit_id":"76d62c67a08524eb7713f6538ab1be3ea4e8c009"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"a764f8c02e820eccd9e407b3f57ec59d26a0b54c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.USER_RWX_OTHER_RX_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a41bdd9_1017d248","line":72,"in_reply_to":"9a41bdd9_cdda3517","updated":"2015-07-15 14:21:25.000000000","message":"1. I\u0027m speaking about the UNIX file permissions system at first. It *allows* one to locally erase the whole system. While this seems like a security risk for some I see it as the nature of the system -- you are *free* to do anything with it. There is no way to take that away from the `root\u0027 user.\n\n2. Users should not do anything as `root\u0027 at the machines they do value. Without the `root\u0027 access one can not do anything with the filesystem outside of their sandboxes: home and temp dir.","commit_id":"76d62c67a08524eb7713f6538ab1be3ea4e8c009"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"1e4617a390eff787e3a26c629b9685a32eddd8fc","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            cmd \u003d command[\"remote_path\"]"},{"line_number":70,"context_line":"            stdin \u003d None"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if command.get(\"local_path\"):"},{"line_number":73,"context_line":"            remote_path \u003d cmd[-1] if isinstance(cmd, (tuple, list)) else cmd"},{"line_number":74,"context_line":"            ssh.put_file(command[\"local_path\"], remote_path,"},{"line_number":75,"context_line":"                         mode\u003dself.USER_RWX_OTHER_RX_ACCESS_MODE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a41bdd9_cdda3517","line":72,"in_reply_to":"9a41bdd9_ed6619ba","updated":"2015-07-15 14:13:52.000000000","message":"I don\u0027t think Rally is designed to be fool-proof, but it is designed to be obvious and intuitive, and this misfeature is neither.\n\nYou\u0027re optimizing for the wrong use-case. This lets someone shave a few seconds off when they want to install their own interpreter -- an optimization that will be vanishingly rare in the wild -- at the cost of making command_dict more difficult and dangerous to use, especially for new users.","commit_id":"76d62c67a08524eb7713f6538ab1be3ea4e8c009"}],"tests/unit/task/test_validation.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"2a95aa3bb360009c88b3d6316b02c6fe8aa43df6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"9a41bdd9_6fba74c2","updated":"2015-07-13 15:47:05.000000000","message":"Add tests for local_file used with script_file and script_inline.","commit_id":"249bfd94747611f7b5b0b20c89c0796ee6ede636"}]}
