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:
2026-07-30 03:59:15 -04:00
parent 72e582eb15
commit d7fc9d45fb
6 changed files with 250 additions and 2 deletions
+3
View File
@@ -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;