Index: src/cg-annotate.cpp
--- src/cg-annotate.cpp.orig
+++ src/cg-annotate.cpp
@@ -24,6 +24,8 @@
 namespace fs = ::std::filesystem;
 using namespace CG3;
 
+extern "C" int pledge(const char *, const char *);
+
 inline auto xml_encode(std::string_view in) {
 	std::string buf;
 	buf.reserve(in.size());
@@ -65,6 +67,10 @@ inline void file_save(fs::path fn, std::string_view da
 }
 
 int main(int argc, char* argv[]) {
+	if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+		std::cerr << "pledge" << std::endl;
+		CG3Quit(1);
+	}
 	using namespace ::std::string_literals;
 	(void)argc;
 
