8648 Commits

Author SHA1 Message Date
Ivan Gabaldon
d0b7f26f4b [fix] CI: container-mounts bad hash
This is a typo, but if there are multiple patterns in hashFiles, they should be separated by commas.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#examples-with-multiple-patterns
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
b42f812c57
[fix] CI: handle old cache images from registry
Currently, we have 1100~ cache images uploaded to GHCR that weigh more than 300 MB each (most of them are layers from the second phase of the Dockerfile that were uploaded by mistake, read below). To avoid problems, I have set up a new job in a new workflow to be run weekly purging all images older than 1 week, but leaving always the 100 most recent ones.

Only the builder images should be uploaded to cache, the actual behaviour not only slows down the time for building the container, but also wastes lots of space by saving large and useless layers to GHCR that will never be used again.
2025-05-14 22:42:36 +02:00
dependabot[bot]
c73b469ce7
Bump flask from 3.1.0 to 3.1.1 (#4780)
Bumps [flask](https://github.com/pallets/flask) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.1.0...3.1.1)
2025-05-14 08:18:03 +02:00
Ivan Gabaldon
1a8884fa26
[enh] tidy: clean old morty, filtron, searx references
Everyone should have already switched from legacy methods.
2025-05-13 21:10:02 +02:00
dependabot[bot]
4fb29aae81
[upd] pypi: Bump the minor group with 2 updates (#4776)
Bumps the minor group with 2 updates: [selenium](https://github.com/SeleniumHQ/Selenium) and [redis](https://github.com/redis/redis-py).


Updates `selenium` from 4.31.0 to 4.32.0
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.31.0...selenium-4.32.0)

Updates `redis` from 5.0.8 to 5.2.1
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.8...v5.2.1)
2025-05-13 17:44:10 +02:00
dependabot[bot]
c303da55b0
[upd] web-client (simple): Bump the minor group (#4775)
Bumps the minor group in /client/simple with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.25.1` | `9.26.0` |
| [eslint](https://github.com/eslint/eslint) | `9.25.1` | `9.26.0` |
| [globals](https://github.com/sindresorhus/globals) | `16.0.0` | `16.1.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `6.3.4` | `6.3.5` |
| [webpack](https://github.com/webpack/webpack) | `5.99.7` | `5.99.8` |


Updates `@eslint/js` from 9.25.1 to 9.26.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.26.0/packages/js)

Updates `eslint` from 9.25.1 to 9.26.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.25.1...v9.26.0)

Updates `globals` from 16.0.0 to 16.1.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.0.0...v16.1.0)

Updates `vite` from 6.3.4 to 6.3.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite)

Updates `webpack` from 5.99.7 to 5.99.8
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.7...v5.99.8)
2025-05-13 17:38:46 +02:00
Ivan Gabaldon
2cfd3fc44b
[enh] tidy: clean old morty, filtron, searx references
Everyone should have already switched from legacy methods
2025-05-13 10:37:02 +02:00
Markus Heiser
9006866019
[fix] engine archlinux: avoid Anubis challenge by User-Agent "SearXNG" (#4779)
Of the archlinux wikis only wiki.archlinux.org has a has Anubis challenge.

About Anubis[1]:

> Anubis decides to present a challenge using this logic:
>
> - User-Agent contains "Mozilla"
> ...
> This should ensure that git clients, RSS readers, and other low-harm clients
> can get through without issue ..

[1] 6c0ff3f4d5/docs/docs/design/how-anubis-works.mdx (challenge-presentation)


Suggested-by: @unixfox https://github.com/searxng/searxng/issues/4646#issuecomment-2855322406
Closes: https://github.com/searxng/searxng/issues/4646

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-13 10:18:28 +02:00
Ivan Gabaldon
5d99373bc6
[fix] DOCKERHUB_USERNAME env reference (#4778)
When making the container rework, I unknowingly deleted the section where an env with the same name as the secret was defined on the job scope, making it look like it was originally defined as an organization env.

Since we can't validate the secrets in a condition directly, it's better to let docker/login-action take care of failing the entire job if the credentials are invalid.

Reported in: https://github.com/searxng/searxng/issues/4777
2025-05-12 23:43:47 +02:00
Ivan Gabaldon
945b30a1c4 [mod] lib_sxng_container.sh: replace echo commands with heredoc
Suggested-by: @return42 https://github.com/searxng/searxng/pull/4764#discussion_r2083571202
2025-05-12 17:11:35 +02:00
Ivan Gabaldon
64a5b6920f [mod] lib_sxng_container.sh use required_commands() helper
Suggested-by: @return42 https://github.com/searxng/searxng/pull/4764#discussion_r2083564489
2025-05-12 17:11:35 +02:00
Markus Heiser
346d7fe019
[mod] CI: dependabot group updates by minor & patch and major updates (#4773)
By default, Dependabot opens a new pull request to update each dependency and we
have a very large number of Dependabot pull requests to review and merge, which
can quickly become difficult to manage.

The intention of this patch to dependabot is to have:

- one PR for all minor & patch level updates
- one PR for every dependency with a major update

[1] https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates
[2] https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#groups

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-12 16:42:43 +02:00
Markus Heiser
750a7b4d6f
[doc] add chapter on the purpose of (git) commits (#4729)
Chapter on the purpose of (git) commits

The commits and their messages are elementary for the traceability of changes
and are unfortunately still too often given too little attention.

It therefore seems necessary to dedicate a chapter to this topic in the context
of development.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-12 08:27:16 +02:00
Ivan Gabaldon
da3c640cef revert using null keyword
env.DOCKERHUB_USERNAME shouldn't be an empty string as it's defined and set (I think, I can't see this). Even if wasn't defined, GitHub Org/Repo wide envs/secrets should return an empty string (?)
2025-05-11 19:28:51 +02:00
Ivan Gabaldon
d16854e67a
[mod] rework container deployment (#4764)
container.yml will run after integration.yml COMPLETES successfully and in master branch.

Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows.

* Podman is now supported to build the container images (Docker also received a refactor, merging both build and buildx)
* Container images are being built by Buildah instead of Docker BuildKit.
* Container images are tested before release.
* Splitting "modern" (amd64 & arm64) and "legacy" (armv7) arches on different Dockerfiles allowing future optimizations.
2025-05-11 18:12:51 +02:00
Ivan Gabaldon
1b787ed35e
[mod] refactor integration.yml (#4763)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows.
2025-05-10 13:59:31 +02:00
Ivan Gabaldon
8e2e7774d7
[mod] new l10n.yml workflow (#4734)
l10n.yml will run after integration.yml finishes successfully (will defer anything depending on integration.yml until heavy loads like container building are moved to separate workflows) and in master branch.

* After every integration.yml workflow completes successfully, only the `update` job runs.
* Dispatch and Crontab triggers only the `pr` job.

Style changes, cleanup and improved integration with CI by leveraging the use of shared cache between all workflows (not functional until all workflows have been refactored).
2025-05-10 13:08:20 +02:00
Ivan Gabaldon
e982b9f732 [fix] documentation should run on push/pr
Instead of executing the workflow after integration.yml completes correctly, let's run this workflow parallel to integration.yml restoring the original behaviour.
2025-05-10 07:41:42 +02:00
Émilien (perso)
48456caeb3
chore: docker + github-actions dependabot (#4754)
* chore: docker dependabot

* Add github actions too
2025-05-09 20:46:20 +02:00
Markus Heiser
ef158ce1f4 [build] /static 2025-05-09 12:40:34 +02:00
Markus Heiser
cbf9ec7bf4 [fix] static.build.commit: add missing searx/templates/simple/icons.html
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-09 12:40:34 +02:00
Markus Heiser
409ede1530 [fix] simple client: jinja_svg_catalog addClassesToSVGElement
Starting with ionicons-8.0.8 the SVG already contains a class attribute and
instaed of using SVGO plugin ``addAttributesToSVGElement`` we habve to use
``addClassesToSVGElement`` to add out ``__jinja_class_placeholder__``.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-09 12:40:34 +02:00
dependabot[bot]
1326ec7429 [upd] web-client (simple): Bump ionicons in /client/simple
Bumps [ionicons](https://github.com/ionic-team/ionicons) from 7.4.0 to 8.0.8.
- [Release notes](https://github.com/ionic-team/ionicons/releases)
- [Commits](https://github.com/ionic-team/ionicons/compare/v7.4.0...v8.0.8)

---
updated-dependencies:
- dependency-name: ionicons
  dependency-version: 8.0.8
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-09 12:40:34 +02:00
dependabot[bot]
50406d4b46
[upd] pypi: Bump pylint from 3.3.6 to 3.3.7 (#4750)
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.6...v3.3.7)

---
updated-dependencies:
- dependency-name: pylint
  dependency-version: 3.3.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-09 11:10:37 +02:00
dependabot[bot]
5ce3aa3acf
[upd] pypi: Bump yamllint from 1.37.0 to 1.37.1 (#4752)
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.37.0 to 1.37.1.
- [Release notes](https://github.com/adrienverge/yamllint/releases)
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.37.0...v1.37.1)

---
updated-dependencies:
- dependency-name: yamllint
  dependency-version: 1.37.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-09 11:09:44 +02:00
SearXNG Bot
76ebad0b21
[l10n] update translations from Weblate (#4744)
6f8c520f2 - 2025-05-08 - polskiecus <polskiecus@noreply.codeberg.org>
05dd91d5b - 2025-05-08 - return42 <return42@noreply.codeberg.org>
686b8e5fb - 2025-05-08 - return42 <return42@noreply.codeberg.org>
f40b42bd8 - 2025-05-05 - ehsanrs2 <ehsanrs2@noreply.codeberg.org>
b8013bc99 - 2025-05-03 - polskiecus <polskiecus@noreply.codeberg.org>
5affaa104 - 2025-05-02 - SomeTr <sometr@noreply.codeberg.org>

Co-authored-by: searxng-bot <searxng-bot@users.noreply.github.com>
2025-05-09 09:31:50 +02:00
github-actions[bot]
d76f030cb3
[data] update searx.data - update_wikidata_units.py (#4738) 2025-05-09 07:09:58 +02:00
github-actions[bot]
b3b15ecc72
[data] update searx.data - update_ahmia_blacklist.py (#4739)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:09:00 +02:00
github-actions[bot]
1319b250af
[data] update searx.data - update_currencies.py (#4740)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:08:26 +02:00
github-actions[bot]
198928de05
[data] update searx.data - update_engine_traits.py (#4741)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:07:33 +02:00
github-actions[bot]
11d9c830b8
[data] update searx.data - update_engine_descriptions.py (#4742)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:06:52 +02:00
Ivan Gabaldon
743f90514b
[fix] missing PR perm data-update.yml workflow (#4737)
We actually don't need to keep the token on checkout because `peter-evans/create-pull-request` will read from `github.token`. The obvious `pull-requests` write permission wasn't set in the last fix, so I added it now.
2025-05-08 23:55:23 +02:00
Ivan Gabaldon
48801dbc9a
[mod] CI move build of online docs to dedicated workflow documentation.yml (#4733)
documentation.yml will run after integration.yml COMPLETES successfully (will
defer anything depending on integration.yml until heavy loads like container
building are moved to separate workflows) and in master branch.

Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 17:40:05 +02:00
Ivan Gabaldon
5451ab243a
[fix] fix security.yml workflow (#4735)
Uploading SARIFs needs to write into the repository GitHub security tab
2025-05-08 17:13:07 +02:00
Ivan Gabaldon
7ca24eee45
[fix] missing perm data-update.yml workflow (#4736)
We need to keep the token on checkout and allow writing into the repository to create the branch
2025-05-08 16:51:21 +02:00
Ivan Gabaldon
c6a70782b2
[mod] CI: refactor data-update.yml - searxng_extra/update scripts (#4732)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 15:13:22 +02:00
Ivan Gabaldon
01a07f34b2
[mod] CI refactor security.yml - style and cleanup changes (#4731) 2025-05-08 14:44:22 +02:00
Ivan Gabaldon
f32fcb1243
[mod] CI: refactor checker.yml - make search.checker (#4730)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 13:58:06 +02:00
benpiano800
bc06b1aece
[enh] plugins: tor_check: Add more keywords (#4726)
Previously, there was only one usable keyword for the tor_check plugin. Adding more keywords eliminates confusion.
2025-05-07 10:39:46 +02:00
Brock Vojkovic
ff60fe635f
[fix] sec-fetch-* blocking infinite scroll (#4728) 2025-05-07 10:38:21 +02:00
Markus Heiser
6e7119fa4e
[fix] references from searx.botdetection.http_sec_fetch (#4723) 2025-05-07 10:25:47 +02:00
Ivan Gabaldon
f52cd3f008
missing dependency for armv7 (#4727) 2025-05-07 08:53:34 +02:00
Ivan Gabaldon
a2fa7de880
[mod] Rework Dockerfile - migrate to glibc (debian) (#4721) 2025-05-06 11:56:59 +02:00
Bnyro
0315988f5a
fix] revert searxng/searxng#4699 due to breaking issues (#4720)
This reverts commit 2e74d863210c0d21b9e0a64576dcd24237f23f8c.
2025-05-05 09:46:37 +02:00
Ivan Gabaldon
2e74d86321
Rework Dockerfile (#4699)
This is one of various PR to refactor the entire SearXNG Docker workflow.

Switches to Python glibc based images, all dependencies are installed via pip and not from system repositories, and several minor changes.

This PR will increase the image size from 194.9 MB to 345.47 MB (amd64), this is due to ARMv7 images (needs dependencies for wheels compilation and runtime (?)) and uWSGI webserver. Later PR will reduce the final image size.
2025-05-04 22:27:53 +02:00
Émilien (perso)
19b116f1d7
fix: check if the browser supports Sec-Fetch headers (#4696) 2025-05-04 10:12:25 +02:00
Markus Heiser
fe08bb1d90 [mod] botdetection: HTTP Fetch Metadata Request Headers
HTTP Fetch Metadata Request Headers [1][2] are used to detect bot requests. Bots
with invalid *Fetch Metadata* will be redirected to the intro (`index`)  page.

[1] https://www.w3.org/TR/fetch-metadata/
[2] https://developer.mozilla.org/en-US/docs/Glossary/Fetch_metadata_request_header

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-04 02:07:26 +02:00
Markus Heiser
8ef5fbca4e [fix] cache.ExpireCache: definition of a context name for the key
The definition of a context name belongs in the abstract base class (was
previously only in the concrete implementation for the SQLite adapter).

Suggested-by: @dalf https://github.com/searxng/searxng/pull/4650#discussion_r2069873853
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00
Markus Heiser
7351c38e6c [fix] (armv7) cache.ExpireCache: remove option ENCRYPT_VALUE
Prophylactic encryption of the value currently makes no sense; on the contrary,
since the ``cryptography`` package is not available on armv7, it would cause
further problems.

Suggested-by: @dalf https://github.com/searxng/searxng/pull/4650#issuecomment-2830786661
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00
Markus Heiser
bdfe1c2a15 [mod] engines: migration of the individual cache solutions to EngineCache
The EngineCache class replaces all previously individual solutions for caches in
the context of the engines.

- demo_offline.py
- duckduckgo.py
- radio_browser.py
- soundcloud.py
- startpage.py
- wolframalpha_api.py
- wolframalpha_noapi.py

Search term to test most of the modified engines::

    !ddg !rb !sc !sp !wa test

    !ddg !rb !sc !sp !wa foo

For introspection of the DB, jump into developer environment and run command to
show cache state::

    $ ./manage pyenv.cmd bash --norc --noprofile
    (py3) python -m searx.enginelib cache state

    cache tables and key/values
    ===========================
    [demo_offline        ] 2025-04-22 11:32:50 count        --> (int) 4
    [startpage           ] 2025-04-22 12:32:30 SC_CODE      --> (str) fSOBnhEMlDfE20
    [duckduckgo          ] 2025-04-22 12:32:31 4dff493e.... --> (str) 4-128634958369380006627592672385352473325
    [duckduckgo          ] 2025-04-22 12:40:06 3e2583e2.... --> (str) 4-263126175288871260472289814259666848451
    [radio_browser       ] 2025-04-23 11:33:08 servers      --> (list) ['https://de2.api.radio-browser.info',  ...]
    [soundcloud          ] 2025-04-29 11:40:06 guest_client_id --> (str) EjkRJG0BLNEZquRiPZYdNtJdyGtTuHdp
    [wolframalpha        ] 2025-04-22 12:40:06 code         --> (str) 5aa79f86205ad26188e0e26e28fb7ae7
    number of tables: 6
    number of key/value pairs: 7

In the "cache tables and key/values" section, the table name (engine name) is at
first position on the second there is the calculated expire date and on the
third and fourth position the key/value is shown.

About duckduckgo: The *vqd coode* of ddg depends on the query term and therefore
the key is a hash value of the query term (to not to store the raw query term).

In the "properties of ENGINES_CACHE" section all properties of the SQLiteAppl /
ExpireCache and their last modification date are shown::

    properties of ENGINES_CACHE
    ===========================
    [last modified: 2025-04-22 11:32:27] DB_SCHEMA           : 1
    [last modified: 2025-04-22 11:32:27] LAST_MAINTENANCE    :
    [last modified: 2025-04-22 11:32:27] crypt_hash          : ca612e3566fdfd7cf7efe2b1c9349f461158d07cb78a3750e5c5be686aa8ebdc
    [last modified: 2025-04-22 11:32:30] CACHE-TABLE--demo_offline: demo_offline
    [last modified: 2025-04-22 11:32:30] CACHE-TABLE--startpage: startpage
    [last modified: 2025-04-22 11:32:31] CACHE-TABLE--duckduckgo: duckduckgo
    [last modified: 2025-04-22 11:33:08] CACHE-TABLE--radio_browser: radio_browser
    [last modified: 2025-04-22 11:40:06] CACHE-TABLE--soundcloud: soundcloud
    [last modified: 2025-04-22 11:40:06] CACHE-TABLE--wolframalpha: wolframalpha

These properties provide information about the state of the ExpireCache and
control the behavior.  For example, the maintenance intervals are controlled by
the last modification date of the LAST_MAINTENANCE property and the hash value
of the password can be used to detect whether the password has been changed (in
this case the DB entries can no longer be decrypted and the entire cache must be
discarded).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00