Commit Graph

28 Commits

Author SHA1 Message Date
16942f55a0 Fix medium-severity issues from follow-up security audit
Addresses the remaining medium findings from the second-pass audit:

- DoS hardening: bound GraphQL query cost with FixedComplexityLimit, and
  reject non-positive items-per-page / page values so uint64 conversion
  cannot underflow into an unbounded LIMIT/OFFSET. The -1 "load all"
  sentinel stays valid for dashboards; REST now returns 400 for bad input.

- Security headers: add X-Content-Type-Options, X-Frame-Options,
  Referrer-Policy and a conservative CSP (frame-ancestors/object-src/
  base-uri) that hardens against clickjacking and base-tag injection
  without restricting the self-hosted SPA's inline scripts.

- Stored XSS: render job.metaData.message as escaped text instead of
  {@html ...} in Job.root and JobFootprint, preserving line breaks via
  white-space: pre-wrap.

- SQL injection hardening: parameterize the tag-scope IN list and the
  manager project subquery in CountTags instead of interpolating
  user.Username / user.Projects (externally sourced via OIDC/LDAP).

- CSRF defense-in-depth: reject cross-site state-changing requests via
  Sec-Fetch-Site, failing open for non-browser clients, on top of the
  existing SameSite=Lax session cookie.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: de7d47a85c7c
2026-06-04 20:08:41 +02:00
Jan Eitzinger
12c01655c3 Merge pull request #496 from ClusterCockpit/add_editmetabyrequest_2026
Manually migrate editMetaByRequest to current state of 2026
2026-02-23 12:53:07 +01:00
03c65e06f6 Allow finer control for omit tagged jobs in retention policies 2026-02-23 08:46:47 +01:00
fc1ba1f5b3 Merge branch 'dev' of github.com:ClusterCockpit/cc-backend into dev 2026-02-21 13:52:14 +01:00
82e79b074a Reverse Lookup order in stop job request 2026-02-21 13:51:31 +01:00
Christoph Kluge
2d90fd05d6 Manually migrate editMetaByRequest to current state of 2026
- originally PR #400
2026-02-20 10:38:07 +01:00
e1c1148160 Fix more bugs related to job_cache ids used in job table 2026-02-20 09:20:18 +01:00
8d6c6b819b Update and port to cc-lib 2026-02-11 07:06:06 +01:00
ac7eb93141 fix: Transfer always to main job table before archiving 2026-02-09 19:57:46 +01:00
f6aa40d927 Migrate from gorilla to chi web framework. add 404 handler 2026-02-07 17:48:12 +01:00
fa7727c6ca Print job db id instead of its address 2026-02-06 14:06:56 +01:00
95689e3c99 Add API endpoint for getUsedNodes
Needed by dynamic memory management for external ccms
2026-01-28 07:05:29 +01:00
e1efc68476 Update dependencies. Rebuild graphql and swagger 2026-01-15 08:32:06 +01:00
11ec2267da Major refactor of metric data handling
- make the  internal memory store required and default
- Rename memorystore to metricstore
- Rename metricDataDispatcher to metricdispatch
- Remove metricdata package
- Introduce metricsync package for upstream metric data pull
2025-12-25 08:42:54 +01:00
8576ae458d Switch to cc-lib v2 2025-12-24 09:24:18 +01:00
e6286768a7 Refactor variabel naming and update doc comments 2025-12-16 08:56:48 +01:00
d567a5312e Add flag omitTagged to DeleteJobsBefore
Fixes #344
2025-12-15 14:38:46 +01:00
97a322354f Refactor 2025-12-15 14:06:33 +01:00
f13be109c2 Fix: Replace all Printf log messages with appropriate loglevels 2025-12-11 11:20:11 +01:00
f141ca926f Increase archive version. Fix unit tests. 2025-11-20 14:28:06 +01:00
9973aa9ffa Refactor api package 2025-11-20 07:48:45 +01:00
Christoph Kluge
2a91ca0cff Merge branch 'dev' into rework_status_view 2025-08-13 14:29:19 +02:00
Christoph Kluge
bef832e45b Build new statusDash, refine newRoofline data render 2025-08-07 16:10:11 +02:00
86453e7e11 Port to new job structs
Backup commit: Does not build.
2025-08-05 10:23:54 +02:00
44cd8d258d Fix and regenerate Swagger and GraphQL 2025-07-31 12:10:46 +02:00
639e1b9c6d Port to cc-lib. Extend legal header. 2025-06-30 12:06:35 +02:00
249128e011 Cleanup. Re-generate Swagger 2025-06-06 06:30:40 +02:00
1d8e7e072f Refactor rest api 2025-06-05 13:23:36 +02:00