Skip to content
API Documentation
BastionGuard™
ArchiveSandbox.hpp
Go to the documentation of this file.
1/*
2 * BastionGuard™
3 * Copyright (C) 2025–2026 Calogero Scarnà
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 *
17 * BastionGuard™ is a trademark of Calogero Scarnà.
18 * The BastionGuard™ name and branding are not licensed under the GPL.
19 */
20
21#pragma once
22
23#include "ArchiveResult.hpp"
24#include <string>
25
27 bool launched = false;
28 bool exited = false;
29 bool timed_out = false;
30 bool output_truncated = false;
31 int exit_code = -1;
32
33 std::string stdout_text;
34 std::string stderr_text;
35};
36
38 const std::string& worker_path,
39 const std::string& input_path,
40 int timeout_seconds);
41
43 const std::string& worker_path,
44 const std::string& input_path,
45 int timeout_seconds);
ArchiveInspectionResult analyze_archive_in_sandbox(const std::string &worker_path, const std::string &input_path, int timeout_seconds)
SandboxExecResult run_archive_worker_bwrap(const std::string &worker_path, const std::string &input_path, int timeout_seconds)
std::string stderr_text
std::string stdout_text