1
1
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-11 00:38:20 +01:00
gitea/services/repository
silverwind 0724344a8a
Fix CodeQL code scanning alerts (#36858)
Fixes 10 CodeQL code scanning alerts:

- Change `NewPagination`/`SetLinkHeader` to accept `int64` for total
count, clamping internally to fix incorrect-integer-conversion alerts
([#110](https://github.com/go-gitea/gitea/security/code-scanning/110),
[#114](https://github.com/go-gitea/gitea/security/code-scanning/114),
[#115](https://github.com/go-gitea/gitea/security/code-scanning/115),
[#116](https://github.com/go-gitea/gitea/security/code-scanning/116))
- Use `strconv.Atoi()` in `htmlrenderer.go` to avoid int64 intermediate
([#105](https://github.com/go-gitea/gitea/security/code-scanning/105),
[#106](https://github.com/go-gitea/gitea/security/code-scanning/106))
- Clamp regex match indices in `escape_stream.go` to fix
allocation-size-overflow
([#161](https://github.com/go-gitea/gitea/security/code-scanning/161),
[#162](https://github.com/go-gitea/gitea/security/code-scanning/162),
[#163](https://github.com/go-gitea/gitea/security/code-scanning/163))
- Cap slice pre-allocation in `GetIssueDependencies`
([#181](https://github.com/go-gitea/gitea/security/code-scanning/181))

---------

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-08 14:35:50 +00:00
..
archiver Enable nilnil linter for new code (#36591) 2026-02-16 09:57:18 +00:00
commitstatus Correct spelling (#36783) 2026-02-28 11:23:20 -08:00
files Enable nilnil linter for new code (#36591) 2026-02-16 09:57:18 +00:00
gitgraph Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
adopt_test.go Fix CodeQL code scanning alerts (#36858) 2026-03-08 14:35:50 +00:00
adopt.go Fix CodeQL code scanning alerts (#36858) 2026-03-08 14:35:50 +00:00
avatar_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
avatar.go Fix avatar upload error handling (#35887) 2025-11-07 09:44:09 +08:00
branch.go Delete non-exist branch should return 404 (#36694) 2026-03-02 11:08:16 -08:00
cache.go Move commit related functions to gitrepo package (#35600) 2025-12-05 00:20:23 +00:00
check.go Unify repo names in system notices (#36491) 2026-02-01 17:06:57 +08:00
collaboration_test.go Add more check for stopwatch read or list (#36340) 2026-01-13 13:13:39 +00:00
collaboration.go Add more check for stopwatch read or list (#36340) 2026-01-13 13:13:39 +00:00
commit.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
contributors_graph_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
contributors_graph.go Refactor git command stdio pipe (#36422) 2026-01-22 06:04:26 +00:00
create_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
create.go Fix API not persisting pull request unit config when has_pull_requests is not set (#36718) 2026-03-02 22:08:53 +00:00
delete_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
delete.go Unify repo names in system notices (#36491) 2026-02-01 17:06:57 +08:00
fork_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
fork.go Fix mirror sync parser and fix mirror messages (#36504) 2026-02-11 00:16:05 +00:00
generate_test.go Fix path resolving (#36734) 2026-02-25 01:21:07 +00:00
generate.go Fix path resolving (#36734) 2026-02-25 01:21:07 +00:00
hooks.go Move HasWiki to repository service package (#33912) 2025-09-01 11:12:58 -07:00
init.go Use gitrepo's push function (#36245) 2025-12-28 13:24:28 +02:00
lfs_test.go Fix bug when do LFS GC (#36500) 2026-02-12 15:27:19 -08:00
lfs.go Fix bug when do LFS GC (#36500) 2026-02-12 15:27:19 -08:00
license_test.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
license.go Only keep popular licenses (#33832) 2025-03-10 06:40:37 +08:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
merge_upstream.go Use gitrepo's clone and push when possible (#36093) 2025-12-10 09:41:01 -08:00
migrate.go Fix mirror sync parser and fix mirror messages (#36504) 2026-02-11 00:16:05 +00:00
push.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
repo_team_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
repo_team.go Correct spelling (#36783) 2026-02-28 11:23:20 -08:00
repository_test.go Fix missing repository id when migrating release attachments (#36389) 2026-01-20 10:05:51 -08:00
repository.go Fix missing repository id when migrating release attachments (#36389) 2026-01-20 10:05:51 -08:00
setting.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
template.go Unify repo names in system notices (#36491) 2026-02-01 17:06:57 +08:00
transfer_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
transfer.go Some refactor for repo path (#36251) 2025-12-29 18:49:54 +00:00