Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/0xKirisame/SPiCa
/ functions
Functions
127 in github.com/0xKirisame/SPiCa
⨍
Functions
127
◇
Types & classes
20
↓ 13 callers
Function
evaluate
Pure tick-driven evaluation. No I/O, no printing. Reads the registry + current /proc snapshot, mutates per-record suspect/cooldown state, pushes firin
spica-detect/src/lib.rs:189
↓ 12 callers
Function
xor_fields
(info: &mut ProcessInfo, key: u64)
spica-common/src/lib.rs:51
↓ 8 callers
Function
sample_info
()
spica-common/src/lib.rs:67
↓ 6 callers
Function
proc_info
(tgid: u32, start_time: u64, last_seen: u64)
spica-detect/src/lib.rs:642
↓ 6 callers
Function
write_executable
(path: &str, content: &str)
spica-install/src/lib.rs:149
↓ 5 callers
Function
derive_integrity_token
Derive the 64-bit integrity canary from BASE_KEY via SipHash-1-3. Properties: - Deterministic: same BASE_KEY always produces the same token. - Not in
spica-key/src/lib.rs:151
↓ 4 callers
Function
on_sched_event
Called when a sched_switch event arrives. Updates `sched_last` on the record and checks for DUPE (start_time_ns mismatch — same TGID, different kernel
spica-detect/src/lib.rs:287
↓ 4 callers
Function
rebuild
(cmd: &str, args: &[&str])
spica-install/src/lib.rs:165
↓ 3 callers
Function
detect_distro
()
spica-install/src/lib.rs:119
↓ 2 callers
Function
clear_watchdog_pin
Remove the watchdog pin. Called on clean shutdown (SIGTERM/SIGINT) and on startup after detecting a leftover pin from a previous run.
spica/src/bpf.rs:145
↓ 2 callers
Function
fallback
(compile_time_key: u64)
spica-key/src/lib.rs:127
↓ 2 callers
Function
lkm_event
(tgid: u32, allowed: bool)
spica-detect/src/lib.rs:723
↓ 2 callers
Function
on_lkm_event
Called when an LKM load attempt event arrives. Always returns a Detection (either LkmAllow during boot window or LkmDeny after gate locked). There's n
spica-detect/src/lib.rs:344
↓ 2 callers
Function
on_nmi_event
Called when a normal NMI heartbeat event arrives (event_type == 0). Updates `nmi_last` on the record. Always returns None — NMI doesn't drive any even
spica-detect/src/lib.rs:328
↓ 2 callers
Function
require_root
()
spica-install/src/lib.rs:134
↓ 2 callers
Function
resolve
Try the TPM first; on any failure fall back visibly to the compile-time key. `compile_time_key` is the per-build fallback generated by `spica/build.r
spica-key/src/lib.rs:115
↓ 2 callers
Function
set_mode
(path: &str, mode: u32)
spica-install/src/lib.rs:158
↓ 1 callers
Function
check_bpf_lsm_available
Read `/sys/kernel/security/lsm` and check whether the BPF LSM is loaded.
spica-seccheck/src/lib.rs:92
↓ 1 callers
Function
check_ima_active
Check whether `/sys/kernel/security/ima` exists (IMA subsystem active).
spica-seccheck/src/lib.rs:80
↓ 1 callers
Function
check_ima_module_policy
Read `/proc/cmdline` and check for IMA appraisal policy.
spica-seccheck/src/lib.rs:85
↓ 1 callers
Function
check_module_sig_force
Read `/boot/config-$(uname -r)` and check for SIG_FORCE.
spica-seccheck/src/lib.rs:66
↓ 1 callers
Function
check_secure_boot
Read the SecureBoot EFI variable and return its state. Returns false if efivarfs isn't mounted, the variable is missing, or the data is malformed. Th
spica-seccheck/src/lib.rs:51
↓ 1 callers
Function
comm_str
Format the kernel `comm` field (16-byte null-padded) as a UTF-8 string.
spica-detect/src/lib.rs:361
↓ 1 callers
Method
get_random_key
(&mut self)
spica-key/src/lib.rs:53
↓ 1 callers
Function
install
Install SPiCa to /usr/local/bin and integrate with the distro's initramfs.
spica-install/src/lib.rs:72
↓ 1 callers
Function
install_binary
()
spica-install/src/lib.rs:142
↓ 1 callers
Method
lock_lsm_gate
Set sc_gate[0] = 1, blocking all subsequent LKM loads with EPERM. No-op (returns Ok(())) if the LSM program didn't attach.
spica/src/bpf.rs:119
↓ 1 callers
Function
parse_bpf_lsm_available
Check whether the kernel's LSM list (from `/sys/kernel/security/lsm`) includes the BPF LSM.
spica-seccheck/src/lib.rs:40
↓ 1 callers
Function
parse_ima_module_policy
Check whether `/proc/cmdline` requests an IMA appraisal policy.
spica-seccheck/src/lib.rs:32
↓ 1 callers
Function
parse_module_sig_force
Check whether `/boot/config-X` text contains `CONFIG_MODULE_SIG_FORCE=y`.
spica-seccheck/src/lib.rs:27
↓ 1 callers
Function
parse_secure_boot_var
Parse a SecureBoot EFI variable's raw bytes. EFI variable file layout: 4 bytes attributes + variable-length data. For SecureBoot the data is a single
spica-seccheck/src/lib.rs:22
↓ 1 callers
Function
print_install_summary
(distro: Distro)
spica-install/src/lib.rs:178
↓ 1 callers
Function
print_uninstall_summary
(distro: Distro)
spica-install/src/lib.rs:196
↓ 1 callers
Function
read_tgids
Read the numeric subdirectories of `/proc` and return them as a set of TGIDs. Any non-numeric entry is silently skipped (`.`, `..`, `self`, `mounts`,
spica/src/proc.rs:21
↓ 1 callers
Function
resolve_comm
(tgid: u32)
spica/src/main.rs:199
↓ 1 callers
Function
run
Run all four security-stack checks + BPF LSM check and print status. SPiCa is the last-resort layer; this just audits the layers above and warns the
spica-seccheck/src/lib.rs:104
↓ 1 callers
Function
run_detection
()
spica/src/main.rs:53
↓ 1 callers
Method
to_detection_class
Map to the corresponding public DetectionClass variant.
spica-detect/src/lib.rs:66
↓ 1 callers
Function
try_lsm_modblock
(ctx: LsmContext)
spica-ebpf/src/main.rs:247
↓ 1 callers
Function
try_nmi
(_ctx: PerfEventContext)
spica-ebpf/src/main.rs:173
↓ 1 callers
Function
try_sched
(ctx: BtfTracePointContext)
spica-ebpf/src/main.rs:100
↓ 1 callers
Function
try_watchdog
(_ctx: TracePointContext)
spica-ebpf/src/main.rs:293
↓ 1 callers
Function
uninstall
Remove SPiCa and its initramfs integration. Rebuilds the initramfs so the next boot doesn't reference the removed hooks.
spica-install/src/lib.rs:96
↓ 1 callers
Function
watchdog_pin_exists
Returns true if a previous SPiCa instance left a watchdog pin behind (meaning it was killed ungracefully — SIGKILL, OOM, crash).
spica/src/bpf.rs:139
Function
class_state_is_16_bytes
()
spica-detect/src/lib.rs:378
Function
compile_time_key_returns_its_value
()
spica-key/src/lib.rs:184
Function
derive_integrity_token_different_keys_differ
()
spica-key/src/lib.rs:217
Function
derive_integrity_token_handles_zero_key
()
spica-key/src/lib.rs:224
Function
derive_integrity_token_is_deterministic
()
spica-key/src/lib.rs:198
Function
derive_integrity_token_is_not_invertible_to_key
()
spica-key/src/lib.rs:204
Function
detect_distro_does_not_panic_on_mac
()
spica-install/src/lib.rs:261
Function
detection_class_labels_are_uppercase_no_spaces
()
spica-detect/src/lib.rs:396
Function
dkom_clears_when_process_reappears_in_proc
()
spica-detect/src/lib.rs:504
Function
dkom_fires_when_scheduled_but_absent_from_proc
()
spica-detect/src/lib.rs:432
Function
dkom_respects_cooldown
()
spica-detect/src/lib.rs:470
Function
dkom_respects_grace_window
()
spica-detect/src/lib.rs:451
Function
embedded_scripts_are_nonempty
()
spica-install/src/lib.rs:268
Function
embedded_scripts_have_no_network_locked_language
()
spica-install/src/lib.rs:291
Function
embedded_scripts_have_no_subprocess_tpm_refs
()
spica-install/src/lib.rs:277
Function
embedded_scripts_reference_libtss2
()
spica-install/src/lib.rs:300
Function
evaluate_does_not_reallocate_out_when_empty
()
spica-detect/src/lib.rs:626
Function
evaluate_evicts_records_stale_on_both_channels_and_not_in_proc
()
spica-detect/src/lib.rs:592
Function
evaluate_retains_records_that_are_in_proc_even_if_stale
()
spica-detect/src/lib.rs:609
Function
fallback_returns_provided_key
()
spica-key/src/lib.rs:253
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
spica-install/src/lib.rs:49
Method
from
(e: std::io::Error)
spica-install/src/lib.rs:66
Function
ghost_fires_when_in_proc_never_observed
()
spica-detect/src/lib.rs:529
Function
install_error_display_messages_are_useful
()
spica-install/src/lib.rs:251
Method
label
Uppercased label for the alert line, e.g. `DKOM`, `LKM-DENY`.
spica-detect/src/lib.rs:35
Method
load
Load eBPF, set globals, attach programs, pin watchdog, take ring buffers. Returns the runtime + whether the LSM gate attached (kernel config dependen
spica/src/bpf.rs:36
Method
lsm_attached
(&self)
spica/src/bpf.rs:128
Method
lsm_rb_mut
(&mut self)
spica/src/bpf.rs:132
Function
main
Building this crate has an undeclared dependency on the `bpf-linker` binary. This would be better expressed by [artifact-dependencies][bindeps] but is
spica-ebpf/build.rs:14
Function
main
()
xtask/src/main.rs:24
Function
main
()
spica/build.rs:5
Function
main
()
spica/src/main.rs:39
Method
new
()
spica-key/src/lib.rs:75
Method
new
Used when a new TGID is first observed via sched/NMI event.
spica-detect/src/lib.rs:122
Method
nmi_rb_mut
(&mut self)
spica/src/bpf.rs:131
Function
on_lkm_event_returns_allow_when_gate_open
()
spica-detect/src/lib.rs:731
Function
on_lkm_event_returns_deny_when_gate_closed
()
spica-detect/src/lib.rs:738
Function
on_nmi_event_ignores_zero_tgid
()
spica-detect/src/lib.rs:714
Function
on_nmi_event_updates_nmi_last
()
spica-detect/src/lib.rs:704
Function
on_sched_event_anchors_start_time_if_unknown
()
spica-detect/src/lib.rs:678
Function
on_sched_event_creates_record_for_new_tgid
()
spica-detect/src/lib.rs:650
Function
on_sched_event_fires_dupe_on_start_time_mismatch
()
spica-detect/src/lib.rs:662
Function
on_sched_event_ignores_zero_tgid
()
spica-detect/src/lib.rs:692
Function
panic
(_info: &core::panic::PanicInfo)
spica-ebpf/src/main.rs:306
Function
parse_bpf_lsm_available_when_present
()
spica-seccheck/src/lib.rs:208
Function
parse_bpf_lsm_does_not_match_substring_in_other_names
()
spica-seccheck/src/lib.rs:218
Function
parse_bpf_lsm_unavailable_when_absent
()
spica-seccheck/src/lib.rs:213
Function
parse_ima_module_policy_absent
()
spica-seccheck/src/lib.rs:201
Function
parse_ima_module_policy_appraise_tcb
()
spica-seccheck/src/lib.rs:186
Function
parse_ima_module_policy_enforce
()
spica-seccheck/src/lib.rs:191
Function
parse_ima_module_policy_template
()
spica-seccheck/src/lib.rs:196
Function
parse_module_sig_force_absent
()
spica-seccheck/src/lib.rs:168
Function
parse_module_sig_force_does_not_match_unrelated_lines
()
spica-seccheck/src/lib.rs:174
Function
parse_module_sig_force_present
()
spica-seccheck/src/lib.rs:162
Function
parse_secure_boot_var_disabled
()
spica-seccheck/src/lib.rs:148
Function
parse_secure_boot_var_enabled
()
spica-seccheck/src/lib.rs:141
next →
1–100 of 127, ranked by callers