pub struct DangerousGitComponents {
pub hooks: &'static [&'static str],
pub dangerous_config_keys: &'static [&'static str],
pub dangerous_files: &'static [&'static str],
}
pub const DANGEROUS_COMPONENTS: DangerousGitComponents = DangerousGitComponents {
hooks: &[
"applypatch-msg",
"pre-applypatch",
"post-applypatch",
"pre-commit",
"pre-merge-commit",
"prepare-commit-msg",
"commit-msg",
"post-commit",
"pre-rebase",
"post-checkout",
"post-merge",
"pre-push",
"pre-receive",
"update",
"proc-receive",
"post-receive",
"post-update",
"reference-transaction",
"push-to-checkout",
"pre-auto-gc",
"post-rewrite",
"sendemail-validate",
"fsmonitor-watchman",
"p4-changelist",
"p4-prepare-changelist",
"p4-post-changelist",
"p4-pre-submit",
"post-index-change",
],
dangerous_config_keys: &[
"core.fsmonitor",
"core.sshCommand",
"core.gitProxy",
"credential.helper",
"filter.*.clean",
"filter.*.smudge",
"filter.*.process",
"diff.*.command",
"diff.*.textconv",
"merge.*.driver",
"protocol.*.allow",
"url.*.insteadOf",
"core.hooksPath",
"include.path",
"includeIf.*.path",
"lfs.customtransfer.*.path",
"gpg.program",
"gpg.*.program",
],
dangerous_files: &[
".git/config",
".git/hooks/*",
".git/info/attributes",
".gitattributes",
".gitmodules",
".lfsconfig",
],
};