Skip to content

Commit 4f17ddb

Browse files
authored
ci: add cargo audit cron job (#8)
* ci: add cargo audit cron job * fix doc warnings * update codeowners
1 parent b89473b commit 4f17ddb

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
* @init4tech/engineering
2-
.github/workflows @rswanson
2+
.github/workflows @init4tech/devops
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Security Audit
2+
# This workflow uses rustsec/audit-check to check for security vulnerabilities
3+
# On scheduled runs: automatically creates GitHub issues for findings
4+
# On push/PR: creates status checks that fail when vulnerabilities are found
5+
6+
on:
7+
schedule:
8+
# Run daily at 09:00 UTC
9+
- cron: '0 9 * * *'
10+
workflow_dispatch: # Allow manual runs
11+
12+
permissions: # these permissions are required for the workflow to run
13+
contents: read # Required to checkout the repository
14+
issues: write # Required to create issues (scheduled runs)
15+
checks: write # Required to create status checks (push/PR)
16+
17+
jobs:
18+
security-audit:
19+
uses: init4tech/actions/.github/workflows/rust-audit-security.yml@main

src/sys/txn_manager.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub(crate) struct Commit {
4242
pub(crate) span: tracing::Span,
4343
}
4444

45-
/// Messages sent to the [`TxnManager`].
45+
/// Messages sent to the [`LifecycleHandle`].
4646
pub(crate) enum LifecycleEvent {
4747
Begin(Begin),
4848
Abort(Abort),
@@ -99,7 +99,7 @@ pub(crate) struct RwSyncLifecycle {
9999
}
100100

101101
impl RwSyncLifecycle {
102-
/// Creates a new [`TxnManager`], spawns a background task, returns
102+
/// Creates a new [`LifecycleHandle`], spawns a background task, returns
103103
/// a sender to communicate with it.
104104
pub(crate) fn spawn(env: EnvPtr) -> LifecycleHandle {
105105
let (tx, rx) = sync_channel(0);
@@ -133,12 +133,12 @@ impl RwSyncLifecycle {
133133
sender.send(mdbx_result(unsafe { ffi::mdbx_txn_commit_ex(tx.0, latency.0) })).unwrap();
134134
}
135135

136-
/// Spawns a new [`std::thread`] that listens to incoming [`RwSyncLifecycle::Message`] messages,
136+
/// Spawns a new [`std::thread`] that listens to incoming [`LifecycleEvent`] messages,
137137
/// executes an FFI function, and returns the result on the provided channel.
138138
///
139-
/// - [`RwSyncLifecycle::Message::Begin`] opens a new transaction with [`ffi::mdbx_txn_begin_ex`]
140-
/// - [`RwSyncLifecycle::Message::Abort`] aborts a transaction with [`ffi::mdbx_txn_abort`]
141-
/// - [`RwSyncLifecycle::Message::Commit`] commits a transaction with [`ffi::mdbx_txn_commit_ex`]
139+
/// - [`LifecycleEvent::Begin`] opens a new transaction with [`ffi::mdbx_txn_begin_ex`]
140+
/// - [`LifecycleEvent::Abort`] aborts a transaction with [`ffi::mdbx_txn_abort`]
141+
/// - [`LifecycleEvent::Commit`] commits a transaction with [`ffi::mdbx_txn_commit_ex`]
142142
fn start_message_listener(self) {
143143
let task = move || {
144144
loop {

src/tx/iter/dupfixed_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ where
135135
/// Fetch the next page of values for the current key.
136136
///
137137
/// Unlike
138-
/// [`IterDupFixed::fetch_next_page`](crate::tx::aliases::IterDupFixed),
138+
/// [`IterDupFixed::fetch_next_page`](super::IterDupFixed),
139139
/// this does NOT move to the next key when pages are exhausted. It simply
140140
/// returns `Ok(false)` to signal exhaustion.
141141
///

0 commit comments

Comments
 (0)