Skip to content

Commit 98e5280

Browse files
authored
Fix: feed-filter .inc file paths (#2012)
* Fix: feed-filter .inc file paths * fix typos
1 parent 967b4b2 commit 98e5280

File tree

8 files changed

+19
-9
lines changed

8 files changed

+19
-9
lines changed

rust/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ hyper = { version = "1", features = ["full"] }
1616
hyper-rustls = "0"
1717
hyper-util = { version = "0", features = ["tokio"] }
1818
insta = { version = "1.41.1", features = ["ron", "toml"] }
19-
reqwest = "0.12.23"
2019
rustls = "0.23.31"
2120
rustls-pemfile = "2.2.0"
2221
rustls-pemfile-old = { version = "1.0.2", package = "rustls-pemfile" }
@@ -136,6 +135,7 @@ nasl-function-proc-macro = { path = "crates/nasl-function-proc-macro" }
136135
greenbone-scanner-framework = { path = "crates/greenbone-scanner-framework" }
137136
nasl-c-lib = { path = "crates/nasl-c-lib", optional = true }
138137
rpmdb = { path = "crates/rpmdb-rs" }
138+
search_path = "0.1.4"
139139

140140
[workspace]
141141
members = ["crates/smoketest", "crates/nasl-function-proc-macro"]

rust/crates/smoketest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ All settings for running the smoke-tests are set via environmental variables. Th
2424
|TARGET_PASSWORD|Password for login in the target during the authenticated scan|empty string|no|Necessary for authenticated scans|
2525
|API_KEY|API Key for authenticated communication with `openvasd`|None|no||
2626
|OPENVASD_SERVER|Socket where openvasd listen on|http://127.0.0.1:3000|no|Must be specified with port|
27-
|CLIENT_CERT|PEM file combinating public certificate and any 3rd party intermediate certificates ||yes for mTLS|Necessary for mTLS enabled|
27+
|CLIENT_CERT|PEM file combining public certificate and any 3rd party intermediate certificates ||yes for mTLS|Necessary for mTLS enabled|
2828
|CLIENT_KEY|Client private key||yes for mTLS|Necessary for mTLS enabled|
2929
|SCAN_CONFIG|Scan config in json file format to be run against the target|simple_scan_ssh_only.json|yes||
3030

rust/src/feed_filter/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ impl ScriptReader {
260260
ast.iter_stmts()
261261
.filter_map(|stmt| {
262262
if let Statement::Include(include) = stmt {
263-
Some(ScriptPath(include.path.clone()))
263+
let sp = search_path::SearchPath::from(self.feed_path.clone());
264+
sp.find_file(&PathBuf::from(include.path.as_str()))
265+
.map(|i| ScriptPath::new(&self.feed_path, &i))
264266
} else {
265267
None
266268
}
@@ -302,8 +304,9 @@ impl RunnableScripts {
302304
assert!(
303305
resolved.keys().any(|k| k.0 == dep.0)
304306
|| unresolved.keys().any(|k| k.0 == dep.0),
305-
"Reference to non-existent file: {}",
306-
k.0
307+
"References to non-existent file: {}. dep: {}",
308+
k.0,
309+
dep.0
307310
);
308311
}
309312
}

rust/src/nasl/builtin/ssh/libssh/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl SshSession {
235235
}
236236
}
237237

238-
/// Conveniene macro to implement a method of the underlying
238+
/// Convenience macro to implement a method of the underlying
239239
/// libssh::Session by calling it with all given arguments and
240240
/// transforming the Err variant according to the given SshError
241241
/// variant, giving it the session id and the error message.

rust/src/notus/notus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ where
119119
fn signature_check(&self) -> Result<(), Error> {
120120
if self.signature_check {
121121
match self.loader.verify_signature() {
122-
Ok(_) => tracing::trace!("Signature check succsessful"),
122+
Ok(_) => tracing::trace!("Signature check successful"),
123123
Err(VerifyError::MissingKeyring) => {
124124
tracing::warn!("Signature check enabled but missing keyring");
125125
return Err(Error::SignatureCheckError(VerifyError::MissingKeyring));

rust/src/scannerctl/notus_update/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ where
5353

5454
if signature_check {
5555
match advisories_files.verify_signature() {
56-
Ok(_) => tracing::info!("Signature check succsessful"),
56+
Ok(_) => tracing::info!("Signature check successful"),
5757
Err(feed::VerifyError::MissingKeyring) => {
5858
tracing::warn!("Signature check enabled but missing keyring");
5959
return Err(feed::VerifyError::MissingKeyring.into());

rust/src/scannerctl/osp/start_scan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ impl From<models::Credential> for Credential {
610610
credentials.push(("password".to_string(), password));
611611
credentials.push(("community".to_string(), community));
612612
credentials.push(("auth_algorithm".to_string(), auth_algorithm));
613-
credentials.push(("privacy_passwor".to_string(), privacy_password));
613+
credentials.push(("privacy_password".to_string(), privacy_password));
614614
credentials.push(("privacy_algorithm".to_string(), privacy_algorithm));
615615
}
616616
};

0 commit comments

Comments
 (0)