Skip to content

Commit

Permalink
Add license header to source code files that were missing one
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehforsch committed Jan 7, 2025
1 parent 725c950 commit fe02fb8
Show file tree
Hide file tree
Showing 46 changed files with 230 additions and 0 deletions.
5 changes: 5 additions & 0 deletions misc/openvas-krb5.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


#include "openvas-krb5.h"

#include <ctype.h>
Expand Down
5 changes: 5 additions & 0 deletions misc/openvas-krb5.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


#include <krb5/krb5.h>
#include <stdbool.h>
#ifndef OPENVAS_KRB5
Expand Down
5 changes: 5 additions & 0 deletions rust/src/feed/transpile/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use thiserror::Error;

use crate::nasl::syntax::{LoadError, Statement};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


pub mod feed;
pub mod models;
pub mod nasl;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/models/resources/check.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use crate::models::scanner::ObservableResources;

/// Checks for relative resource availability.
Expand Down
5 changes: 5 additions & 0 deletions rust/src/models/resources/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


pub mod check;

#[derive(Debug)]
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/cryptographic/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod aes_cbc;
mod aes_ccm;
mod aes_cmac;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use thiserror::Error;

use crate::nasl::prelude::*;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/http/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::io;

use thiserror::Error;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/network/tcp.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{
io::{self, BufRead, BufReader, Read, Write},
net::{IpAddr, SocketAddr},
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/network/tls.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use core::fmt;
use std::{
fmt::{Display, Formatter},
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/network/udp.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{
io::{self, Read, Write},
net::{IpAddr, SocketAddr, UdpSocket},
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/raw_ip/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod frame_forgery;
mod packet_forgery;
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/report_functions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::sync::{Arc, RwLock};

use crate::models::{self, Protocol, ResultType};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::fmt;

use thiserror::Error;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/libssh/channel.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::time::Duration;

use crate::nasl::builtin::ssh::error::SshErrorKind;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/libssh/session.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use libssh_rs::{AuthMethods, AuthStatus, InteractiveAuthInfo, Session, Sftp, SshKey, SshOption};
use std::{os::fd::AsRawFd, time::Duration};
use tokio::sync::{Mutex, MutexGuard};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod error;
mod sessions;
mod utils;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/russh/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod session;

pub use session::SshSession;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/russh/session.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::borrow::Cow;
use std::time::Duration;
use std::{net::IpAddr, sync::Arc};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/sessions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::collections::{HashMap, HashSet};

use tokio::sync::{Mutex, MutexGuard};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod server;

use std::sync::Arc;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/tests/server.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::collections::HashMap;
use std::net::SocketAddr;
use std::sync::Arc;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/ssh/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use russh::cipher;
use russh_keys::key;

Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/sys/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{
env, io,
path::{Path, PathBuf},
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/builtin/tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! This module contains tests for the nasl_function proc macro.
//! It would be nicer to have this within the proc_macro crate itself,
//! but testing proc_macros comes with a lot of difficulties and the tests
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/interpreter/code_interpreter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! Contains implementations of Interpreter that handle the simulation of forking methods for the
//! caller.
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/interpreter/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod description;
mod local_var;
mod retry;
5 changes: 5 additions & 0 deletions rust/src/nasl/interpreter/tests/retry.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! Checks that errors that specify that they are solvable by
//! retrying are actually retried within the interpreter.
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


mod builtin;
pub mod interpreter;
pub mod syntax;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! Utilities to test the outcome of NASL functions
use std::{
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/executor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! This module contains the `Executor` type, as well as utility functions and macros
//! to conveniently build sets of functions for a particular purpose.
//!
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/executor/nasl_function.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{future::Future, pin::Pin};

use crate::nasl::{Context, NaslResult, Register};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/from_nasl_value.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{collections::HashMap, path::Path};

use crate::nasl::prelude::*;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/maybe.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use crate::nasl::syntax::NaslValue;

use crate::nasl::FnError;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! This module provides machinery to handle typical usecases
//! while parsing the input arguments to NASL functions.
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/positionals.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{marker::PhantomData, ops::Index};

use crate::nasl::{FnError, Register};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/to_nasl_result.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::collections::HashMap;
use std::path::PathBuf;

Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use crate::nasl::prelude::*;

/// `Some(string)` if constructed from either a `NaslValue::String`
Expand Down
5 changes: 5 additions & 0 deletions rust/src/nasl/utils/function/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! Convenience functions, used internally in the `NaslFunctionArg` macro.
use super::super::lookup_keys::FC_ANON_ARGS;
Expand Down
5 changes: 5 additions & 0 deletions rust/src/notus/tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::path::{Path, PathBuf};

use crate::models::{FixedPackage, FixedVersion, Specifier};
Expand Down
5 changes: 5 additions & 0 deletions rust/src/scanner/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


//! Overview of the structure of this module: The `Scanner` is the
//! single instance managing all scans during a run with Openvasd
//! scanner type. To do so, it starts a number of `RunningScan`s,
Expand Down
5 changes: 5 additions & 0 deletions rust/src/scanner/running_scan.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use std::{
sync::{
atomic::{AtomicBool, Ordering},
Expand Down
5 changes: 5 additions & 0 deletions rust/src/scanner/scanner_stack.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2025 Greenbone AG
//
// SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception


use crate::nasl::syntax::{FSPluginLoader, Loader};
use crate::storage::{DefaultDispatcher, Storage};

Expand Down
Loading

0 comments on commit fe02fb8

Please sign in to comment.