# Notices

LightMoon is licensed under the MIT License (see `LICENSE`). It includes material from
the following projects, under their own licenses.

## OWASP CRS

`lightmoon/crs` (`src/rules/crs/rules.generated.ts` and the files built from it) contains
rules derived from the OWASP CRS, version 4.29.0.

- Copyright (c) 2006-2020 Trustwave and contributors. All rights reserved.
- Copyright (c) 2021-2026 CRS project. All rights reserved.

Licensed under the Apache License, Version 2.0 (see `LICENSE-CRS`). You may not use these
files except in compliance with that license.

Changes made by LightMoon: the rules were converted from ModSecurity's SecRule language
to data for LightMoon's engine; regular expressions were converted to JavaScript syntax;
`@pm`, `@pmFromFile`, `@contains`, `@beginsWith`, `@endsWith`, `@streq` and
`@validateByteRange` were converted to regular expressions; `@detectSQLi` and `@detectXSS` run on LightMoon's
port of libinjection (below); rules that depend on
operators, variables or transaction state LightMoon doesn't support were left out; some
rules run on bounded windows of their input; and some rules that fire on ordinary prose
have a lower anomaly score unless `crsRules({ tuning: false })` is used. The unmodified
rules are in `vendor/coreruleset` in the source repository.

LightMoon is not affiliated with or endorsed by OWASP or the CRS project.

## libinjection

`src/rules/libinjection` (and the files built from it) is a TypeScript port of
libinjection 4.0.0 (https://github.com/libinjection/libinjection, commit
d88a8f86d617ac8dcb9169c9f34637aaac71ac76). `src/rules/libinjection/data.generated.ts` is
generated from its tables. The unmodified source and tests are in `vendor/libinjection` in
the source repository.

    Copyright (c) 2012-2016, Nick Galbreath
    Copyright (c) 2017-2024, libinjection Contributors
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are
    met:

    1. Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    https://github.com/libinjection/libinjection
    http://opensource.org/licenses/BSD-3-Clause
