diff --git a/.clang-format b/.clang-format index 79cb37414b..f67302eef7 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. --- Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2deb32b668..8a37ae55a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,10 +8,9 @@ repos: name: Check for license headers entry: ./ci/license-header.py language: python - types_or: - - "c" - - "c++" - exclude: '^(testing/btest/plugins/.*|testing/builtin-plugins/.*)$' + files: '\.(h|c|cpp|cc|spicy|evt)$' + types: [file] + exclude: '^(testing/btest/(Baseline|plugins|spicy|scripts)/.*|testing/builtin-plugins/.*)$' - repo: https://github.com/pre-commit/mirrors-clang-format rev: 'v19.1.4' diff --git a/COPYING b/COPYING index c271d509d3..fb540c0eb0 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 1995-2023, The Regents of the University of California +Copyright (c) 1995-now, The Regents of the University of California through the Lawrence Berkeley National Laboratory and the International Computer Science Institute. All rights reserved. diff --git a/ci/license-header.py b/ci/license-header.py index 985c29a62f..50995b7665 100755 --- a/ci/license-header.py +++ b/ci/license-header.py @@ -5,20 +5,15 @@ import sys exit_code = 0 -pat1 = re.compile( +copyright_pat = re.compile( r"See the file \"COPYING\" in the main distribution directory for copyright." ) -# This is the copyright line used within Spicy plugin and popular in -# Spicy analyzers. -pat2 = re.compile(r"Copyright \(c\) 2... by the Zeek Project. See COPYING for details.") - def match_line(line): - for pat in [pat1, pat2]: - m = pat.search(line) - if m is not None: - return True + m = copyright_pat.search(line) + if m is not None: + return True return False diff --git a/scripts/base/protocols/ldap/main.zeek b/scripts/base/protocols/ldap/main.zeek index 1e23c7bf84..8b7f062901 100644 --- a/scripts/base/protocols/ldap/main.zeek +++ b/scripts/base/protocols/ldap/main.zeek @@ -1,4 +1,4 @@ -# Copyright (c) 2021 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. @load base/frameworks/reporter @load base/protocols/conn/removal-hooks diff --git a/scripts/spicy/zeek.spicy b/scripts/spicy/zeek.spicy index ceaf5ca3b1..22b2070a0d 100644 --- a/scripts/spicy/zeek.spicy +++ b/scripts/spicy/zeek.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. module zeek; diff --git a/scripts/spicy/zeek_file.spicy b/scripts/spicy/zeek_file.spicy index c355a9a4cb..3bcc4a9830 100644 --- a/scripts/spicy/zeek_file.spicy +++ b/scripts/spicy/zeek_file.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. # # TODO: This code would ideally just be a part of zeek.spicy, but that would # come with compilation overhead currently even if not used, see diff --git a/src/analyzer/protocol/finger/finger.evt b/src/analyzer/protocol/finger/finger.evt index cd449acbe1..3e7b06fce9 100644 --- a/src/analyzer/protocol/finger/finger.evt +++ b/src/analyzer/protocol/finger/finger.evt @@ -1,4 +1,4 @@ -# Copyright (c) 2022 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. %doc-id= Zeek::Finger; %doc-description = "Finger analyzer"; diff --git a/src/analyzer/protocol/finger/finger.spicy b/src/analyzer/protocol/finger/finger.spicy index 1e2e4dce06..0d3347ced7 100644 --- a/src/analyzer/protocol/finger/finger.spicy +++ b/src/analyzer/protocol/finger/finger.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2022 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. # # Giving the rare number of instances of this protocol these days, we err on the side of # rejecting sessions if they don't parse well. diff --git a/src/analyzer/protocol/ldap/asn1.spicy b/src/analyzer/protocol/ldap/asn1.spicy index 809159997e..60c26c5081 100644 --- a/src/analyzer/protocol/ldap/asn1.spicy +++ b/src/analyzer/protocol/ldap/asn1.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2021 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. module ASN1; diff --git a/src/analyzer/protocol/ldap/ldap.evt b/src/analyzer/protocol/ldap/ldap.evt index 77f34fb62e..490f45b39a 100644 --- a/src/analyzer/protocol/ldap/ldap.evt +++ b/src/analyzer/protocol/ldap/ldap.evt @@ -1,4 +1,4 @@ -# Copyright (c) 2021 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. %doc-id = Zeek::LDAP; %doc-description = "LDAP analyzer"; diff --git a/src/analyzer/protocol/ldap/ldap.spicy b/src/analyzer/protocol/ldap/ldap.spicy index 14c3607c56..f448d71f0c 100644 --- a/src/analyzer/protocol/ldap/ldap.spicy +++ b/src/analyzer/protocol/ldap/ldap.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2021 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. module LDAP; diff --git a/src/analyzer/protocol/ldap/ldap_zeek.spicy b/src/analyzer/protocol/ldap/ldap_zeek.spicy index 3a6784589f..3795f1ff74 100644 --- a/src/analyzer/protocol/ldap/ldap_zeek.spicy +++ b/src/analyzer/protocol/ldap/ldap_zeek.spicy @@ -1,3 +1,5 @@ +# See the file "COPYING" in the main distribution directory for copyright. + module LDAP_Zeek; import LDAP; diff --git a/src/analyzer/protocol/postgresql/postgresql.evt b/src/analyzer/protocol/postgresql/postgresql.evt index c01e6262e8..b93ea18f65 100644 --- a/src/analyzer/protocol/postgresql/postgresql.evt +++ b/src/analyzer/protocol/postgresql/postgresql.evt @@ -1,3 +1,5 @@ +# See the file "COPYING" in the main distribution directory for copyright. + import PostgreSQL; import PostgreSQL_Zeek; diff --git a/src/analyzer/protocol/postgresql/postgresql.spicy b/src/analyzer/protocol/postgresql/postgresql.spicy index e3127fe6c8..2fdd2635eb 100644 --- a/src/analyzer/protocol/postgresql/postgresql.spicy +++ b/src/analyzer/protocol/postgresql/postgresql.spicy @@ -1,3 +1,5 @@ +# See the file "COPYING" in the main distribution directory for copyright. +# # A PostgreSQL analyzer. # # https://www.postgresql.org/docs/current/protocol.html diff --git a/src/analyzer/protocol/postgresql/postgresql_zeek.spicy b/src/analyzer/protocol/postgresql/postgresql_zeek.spicy index d6cb4425af..d302d0e6be 100644 --- a/src/analyzer/protocol/postgresql/postgresql_zeek.spicy +++ b/src/analyzer/protocol/postgresql/postgresql_zeek.spicy @@ -1,3 +1,5 @@ +# See the file "COPYING" in the main distribution directory for copyright. +# # Set up protocol confirmation/rejection for analyzers, as well as any further # Zeek-specific analysis. diff --git a/src/analyzer/protocol/quic/QUIC.evt b/src/analyzer/protocol/quic/QUIC.evt index a985acf519..0dd6fa73fe 100644 --- a/src/analyzer/protocol/quic/QUIC.evt +++ b/src/analyzer/protocol/quic/QUIC.evt @@ -1,5 +1,5 @@ +# See the file "COPYING" in the main distribution directory for copyright. # Copyright (c) 2023, NCC Group / Fox-IT. See COPYING for details. -# Copyright (c) 2023 by the Zeek Project. See COPYING for details. %doc-id = Zeek::QUIC; %doc-description = "QUIC analyzer"; diff --git a/src/analyzer/protocol/quic/QUIC.spicy b/src/analyzer/protocol/quic/QUIC.spicy index bde1650ee2..03ab0c1c7f 100644 --- a/src/analyzer/protocol/quic/QUIC.spicy +++ b/src/analyzer/protocol/quic/QUIC.spicy @@ -1,5 +1,5 @@ +# See the file "COPYING" in the main distribution directory for copyright. # Copyright (c) 2023, NCC Group / Fox-IT. See COPYING for details. -# Copyright (c) 2023 by the Zeek Project. See COPYING for details. module QUIC; diff --git a/src/analyzer/protocol/quic/decrypt_crypto.cc b/src/analyzer/protocol/quic/decrypt_crypto.cc index fa496413ae..9658157962 100644 --- a/src/analyzer/protocol/quic/decrypt_crypto.cc +++ b/src/analyzer/protocol/quic/decrypt_crypto.cc @@ -1,5 +1,5 @@ +// See the file "COPYING" in the main distribution directory for copyright. // Copyright (c) 2023, NCC Group / Fox-IT. See COPYING for details. -// Copyright (c) 2023 by the Zeek Project. See COPYING for details. /* WARNING: THIS CODE IS NOT SAFE IN MULTI-THREADED ENVIRONMENTS: diff --git a/src/analyzer/protocol/ssl/spicy/SSL.evt b/src/analyzer/protocol/ssl/spicy/SSL.evt index 7ea75c0748..d9fd2e5789 100644 --- a/src/analyzer/protocol/ssl/spicy/SSL.evt +++ b/src/analyzer/protocol/ssl/spicy/SSL.evt @@ -1,4 +1,4 @@ -# Copyright (c) 2024 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. protocol analyzer SSL over TCP: parse with SSL::Message; diff --git a/src/analyzer/protocol/ssl/spicy/SSL.spicy b/src/analyzer/protocol/ssl/spicy/SSL.spicy index e03910dde2..826a8ec7e6 100644 --- a/src/analyzer/protocol/ssl/spicy/SSL.spicy +++ b/src/analyzer/protocol/ssl/spicy/SSL.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2024 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. module SSL; diff --git a/src/analyzer/protocol/ssl/spicy/support.cc b/src/analyzer/protocol/ssl/spicy/support.cc index 1d68a45934..b12c9a65b7 100644 --- a/src/analyzer/protocol/ssl/spicy/support.cc +++ b/src/analyzer/protocol/ssl/spicy/support.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2023 by the Zeek Project. See COPYING for details. +// See the file "COPYING" in the main distribution directory for copyright. #include #include diff --git a/src/analyzer/protocol/syslog/syslog.evt b/src/analyzer/protocol/syslog/syslog.evt index e522612891..49051a826e 100644 --- a/src/analyzer/protocol/syslog/syslog.evt +++ b/src/analyzer/protocol/syslog/syslog.evt @@ -1,4 +1,4 @@ -# Copyright (c) 2022 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. %doc-id= Zeek::Syslog; %doc-description = "Syslog analyzer UDP-only"; diff --git a/src/analyzer/protocol/syslog/syslog.spicy b/src/analyzer/protocol/syslog/syslog.spicy index 67271a6d41..1546928f33 100644 --- a/src/analyzer/protocol/syslog/syslog.spicy +++ b/src/analyzer/protocol/syslog/syslog.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2022 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. module Syslog; diff --git a/src/analyzer/protocol/websocket/unmask.cc b/src/analyzer/protocol/websocket/unmask.cc index 99d8d46ea6..fd87403161 100644 --- a/src/analyzer/protocol/websocket/unmask.cc +++ b/src/analyzer/protocol/websocket/unmask.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2024 by the Zeek Project. See COPYING for details. +// See the file "COPYING" in the main distribution directory for copyright. #include diff --git a/src/analyzer/protocol/websocket/websocket.evt b/src/analyzer/protocol/websocket/websocket.evt index ff182a5156..443df0a096 100644 --- a/src/analyzer/protocol/websocket/websocket.evt +++ b/src/analyzer/protocol/websocket/websocket.evt @@ -1,4 +1,4 @@ -# Copyright (c) 2024 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. %doc-id= Zeek::WebSocket; %doc-description = "webSocket analyzer"; diff --git a/src/analyzer/protocol/websocket/websocket.spicy b/src/analyzer/protocol/websocket/websocket.spicy index 06dc8db254..c39aedbefe 100644 --- a/src/analyzer/protocol/websocket/websocket.spicy +++ b/src/analyzer/protocol/websocket/websocket.spicy @@ -1,4 +1,4 @@ -# Copyright (c) 2024 by the Zeek Project. See LICENSE for details. +# See the file "COPYING" in the main distribution directory for copyright. module WebSocket;