fix: fetcher security — fork+execve, hash verification, tar safety, CLI --help
B1: Replaced all std::system()/popen() with fork+execve — zero shell injection B2+B3: Added sha256/sha512/md5 fields to PackageDef, parser support, actual hash comparison in verify_hash() B4: tar --no-same-owner --no-same-permissions, zip uses unzip instead of tar B5: Patch sha256 verified before application via -i flag (no shell redirect) B6: kappa fetch --help now prints usage and exits 0 Also: removed dead ternary code, added <cstdlib>/<sys/wait.h>/<unistd.h>
This commit is contained in:
@@ -63,6 +63,9 @@ struct PackageDef {
|
||||
std::string name;
|
||||
std::string version;
|
||||
std::string source;
|
||||
std::string sha256;
|
||||
std::string sha512;
|
||||
std::string md5;
|
||||
std::string license;
|
||||
std::vector<Dependency> depends;
|
||||
std::vector<std::string> provides;
|
||||
|
||||
Reference in New Issue
Block a user