87 Commits
Author SHA1 Message Date
Cosmin Cojocar e354c572d9 Fix false positive in G118 when cancel is stored in a slice/map (#1670)
Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-05-11 21:00:26 +02:00
Ravi Sastry Kadali 4ead098510 Add G710 rule for open redirect via taint analysis (#1654) 2026-04-26 09:38:45 +02:00
Cosmin Cojocar 74dc9893d6 Add HTTP file-serving function to the skins of pathtraversal analyzer (#1647)
Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-04-25 10:37:00 +02:00
Cosmin Cojocar 24ee992e95 Added filepath.Abs as a sanitizer (#1643)
it calls Clean internally per Go docs.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-04-23 15:25:57 +02:00
Cosmin Cojocar 87bdc09bee Allow rune to byte conversion (#1642)
Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-04-23 09:21:59 +02:00
Cosmin Cojocar 73293bde6b Allow platform specific conversions (#1641)
Allow platform conversion such as uintptr -> int since are a common
pattern and they are safe.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-04-23 08:43:29 +02:00
Ravi Sastry Kadali 844b1703bf fix(G706): scope slog sinks to msg arg only to prevent false positives on structured attributes (#1623)
slog attribute values are auto-escaped by TextHandler/JSONHandler; only the message arg is a real injection vector.

Fixes: #1622
2026-03-25 21:46:59 +01:00
Cosmin Cojocar 1ced32df14 Port G120 from SSA-based to taint analysis (fixes #1600, #1603) (#1605)
* Port G120 from SSA-based to taint analysis

Fix #1600: G120 now detects ParseMultipartForm across function boundaries
using the taint engine's interprocedural call graph analysis.

Fix #1603: Remove ParseForm, FormValue, and PostFormValue from G120 sinks.
These methods already enforce a built-in 10 MiB body limit in Go's
standard library, so flagging them was a false positive. Only
ParseMultipartForm (genuinely unbounded without MaxBytesReader) is now
flagged.

Changes:
- Replace the 521-line custom SSA analyzer in form_parsing_limits.go with
  a ~55-line taint analysis configuration.
- Extract the shared dependencyChecker (used by G119, G121, G122) into
  its own file dependency_checker.go.
- Add FormParsingLimitRule (CWE-400) to the taint rule registry.
- Rewrite test samples to cover the new behavior including interprocedural
  detection and the built-in limit exclusions.

* Update the RULES.md to be consistent with the implementation

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

---------

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-03-13 12:01:02 +01:00
Ravi Sastry Kadali befce8de5d fix(G118): eliminate false positive for package-level cancel variables (#1602)
* fix(G118): eliminate false positive for package-level cancel variables

  G118 was incorrectly reporting context cancellation function not called
  when the cancel function was assigned to a package-level variable (e.g.,
  in init()) and called in a separate function (e.g., signal handler).

  Root cause: isCancelCalled() lacked special handling for *ssa.Global
  (package-level variables), causing cross-function tracking to fail.

  Solution: Add dedicated tracking for package-level globals, similar to
  the struct field handling added in PR #1596. The fix includes:
  - Check in *ssa.Store case to detect global variable assignments
  - isGlobalCalledInAnyFunc() helper to search all functions for calls
  - isValueCalled() generalized helper for BFS value tracking

* additional test
2026-03-12 17:16:02 +01:00
Cosmin Cojocar b7b2c7b668 feat: add G124 rule for insecure HTTP cookie configuration (#1599)
Add SSA-based analyzer G124 to detect http.Cookie allocations missing
secure attributes: Secure, HttpOnly, or SameSite.

CWE-614. Includes 5 test samples (3 positive, 2 negative).
2026-03-11 14:32:15 +01:00
Cosmin Cojocar 6e66a943db feat: add G709 rule for unsafe deserialization of untrusted data (#1598)
Add taint analysis rule G709 to detect unsafe deserialization when
untrusted input flows into encoding/gob, encoding/xml, or
gopkg.in/yaml.v2 deserialization functions.

CWE-502. Includes 5 test samples (3 positive, 2 negative).
2026-03-11 12:31:10 +01:00
Cosmin Cojocar e7ea2377aa feat: add G708 rule for server-side template injection via text/template (#1597)
Add taint analysis rule G708 to detect SSTI vulnerabilities when using
Go text/template package. Covers two attack vectors:
- User input flowing into Template.Parse() (SSTI/RCE)
- Tainted data passed to Execute/ExecuteTemplate with http.ResponseWriter (XSS)

CWE-94. Includes 6 test samples (3 positive, 3 negative).
2026-03-11 11:03:55 +01:00
Ravi Sastry Kadali 889546214c fix(G118): eliminate false positive when cancel is called via struct field in a closure (#1596)
* fix(G118): eliminate false positive when cancel stored in struct field post-construction

When a cancel function is assigned to a struct field after construction
(e.g. s.cancel = cancel), the SSA FieldAddr for the store is a distinct
value from any FieldAddr created later for defer s.cancel() or inside a
closure. The existing isCancelCalledViaStructField only matched receiver
methods and missed these patterns.

Add isFieldCalledInAnyFunc which scans all SSA functions (including
closures) for a FieldAddr with matching struct pointer type and field
index, then checks whether the loaded value is called. As a side effect,
this also resolves the known false positive for nested struct field access.

fixes: 1595

* update rules documentation
2026-03-10 17:21:24 +01:00
Cosmin Cojocar 0e0eb1792f Fix G118 false positive when cancel is stored in returned struct field (#1593)
When a cancel function is stored in a struct field and the struct is
returned to the caller, the cancel responsibility is transferred.
isCancelCalled did not detect this pattern because the FieldAddr trace
reached a dead end — it never connected the field store to the struct
being returned.

Add isStructFieldReturnedFromFunc that checks whether the struct base
pointer of a FieldAddr is loaded and returned, and call it from the
Store+FieldAddr branch in isCancelCalled.

Fixes #1591
2026-03-09 15:49:02 +01:00
Cosmin Cojocar 59a9da022f Fix G118 false positive on cancel called inside goroutine closure (#1592)
The isCancelCalled function did not handle *ssa.MakeClosure, so when
a cancel function was captured as a free variable in a closure
(e.g. go func() { cancel() }()), gosec could not see the call inside
the closure body and reported a false positive.

Add a MakeClosure case that follows the cancel value into the closure's
FreeVars, allowing the existing call-detection logic to find the
invocation.

Fixes #1590
2026-03-09 15:25:30 +01:00
Cosmin Cojocar c709ed8be3 fix(G118): treat returned cancel func as called (fixes #1584) (#1585)
The isCancelCalled BFS did not handle *ssa.Return, so a cancel
function returned from a helper was flagged as lost even though
responsibility was transferred to the caller.

Add a Return case that recognises the cancel value among the return
operands and treats it as called.

Update the existing 'cancel returned to caller' test to expect 0
issues, and add a new test case matching the exact pattern from
issue #1584 (cancel returned as func() and invoked by the caller
through a shutdown chain).
2026-03-06 19:27:18 +01:00
Cosmin Cojocar 6641fcf966 Fix G115 false positives for guarded int64-to-byte conversions (#1578)
* Fix G115 false positives for guarded int64-to-byte conversions

* Fix lint warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

---------

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-03-01 20:59:20 +01:00
Cosmin Cojocar 7210bac169 fix(analyzers): avoid SSA dependency cycle blowups in issue #1555 paths (#1559)
Route redirect dependency checks through the cycle-safe
dependencyChecker instead of raw recursive valueDependsOn traversal.
This ensures Phi-cycle graphs terminate quickly and avoids recursive
work amplification that can look like hangs on large/generated
codebases.

Also remove the nil fallback in dependencyChecker.dependsOn so all
analyzer paths consistently use cycle-aware logic.

Add regression tests covering raw valueDependsOn behavior on:

Phi cycle without target (must return false)
Phi cycle with target path (must return true)
Self-referential Phi node (must return false)

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-28 10:47:40 +01:00
Cosmin Cojocar 9e5b3e2e5a fix(G120): prevent hang-like analysis blowup in wrapper protection checks (#1556)
Summary:
This change fixes the hang/perceived hang reported in issue #1555 when
scanning large codebases with complex SSA graphs. The fix is
intentionally scoped to G120 form parsing analysis only.

Root cause:
G120 wrapper/middleware protection logic repeatedly called
value-dependency checks across many function/call combinations. The
dependency traversal was depth-limited but not memoized, so cyclic and
branch-heavy SSA structures (especially Phi-related paths) caused
repeated re-traversal of the same graph regions and severe runtime
blowup.

What changed:
A cycle-safe, memoized dependency checker was added and used only inside
the G120 form parsing analysis flow. Existing G120 logic was kept
semantically equivalent while replacing repeated raw dependency
traversals with cached checks. Focused regression tests were added for
cyclic Phi graphs to verify both cases: no target reachable (false) and
target reachable (true), including stable repeated evaluation.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-28 09:46:52 +01:00
Ravi Sastry Kadali 1341aeadb4 fix(G705): eliminate false positive for non-HTTP io.Writer (#1550)
* fix(G705): eliminate false positive for non-HTTP io.Writer

Adds ArgTypeGuards map[int]string to taint.Sink. The XSS analyzer now
requires arg[0] of fmt.Fprint* to implement net/http.ResponseWriter.
Writing exec pipe output to os.Stdout no longer triggers G705.

Fixes: #1548

* improve code coverage
2026-02-27 08:01:14 +01:00
Cosmin Cojocar f2262c88ff G120: avoid false positive when MaxBytesReader is applied in middleware (#1547)
Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-25 15:51:24 +01:00
Cosmin Cojocar c13a48626b Add G707 taint analyzer for SMTP command/header injection (#1535)
This change introduces a new taint-analysis rule, G707, to detect
potential SMTP command/header injection when untrusted input reaches
net/smtp sink.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-21 11:12:34 +01:00
Cosmin Cojocar f61ed314c2 Add G123 analyzer for tls.VerifyPeerCertificate resumption bypass risk (#1534)
Add a new SSA-based analyzer, G123, to detect risky TLS configurations
where VerifyPeerCertificate is set, VerifyConnection is not set, and
session resumption may still be enabled.

The analyzer inspects tls.Config field assignments and also follows
configurations returned from GetConfigForClient callbacks so
callback-based setup paths are covered as well.

This change wires G123 into analyzer registration, maps it to CWE-295,
updates the README rule list, and adds dedicated vulnerable/safe sample
coverage in analyzer tests.

It also includes a targeted #nosec G101 suppression on the analyzer
message string to prevent a known false positive from the linter
(message text only, no credential handling impact).

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-21 10:42:36 +01:00
Cosmin Cojocar b568aa1445 Add G122 SSA analyzer for filepath.Walk/WalkDir symlink TOCTOU race risks (#1532)
This change introduces a new SSA-based analyzer, G122, to detect unsafe
filesystem operations inside filepath.Walk, filepath.WalkDir, and
io/fs.WalkDir callbacks when callback path values flow into race-prone
sinks such as os.Remove, os.OpenFile, os.Rename, and os.Chmod.

It adds CWE mapping for the new rule as G122 -> CWE-367 (TOCTOU race
condition), and adds the CWE-367 definition to the CWE data.

It wires G122 into analyzer registration and updates the README
available rules list.

It adds dedicated G122 sample coverage with vulnerable and safe cases,
including safe root-scoped usage through os.Root APIs (for example
root.Open and root.Remove).

Validation was completed: full test suite passes, golangci-lint reports
zero issues, and gosec CLI validation confirms expected trigger and
non-trigger behavior for G122.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-20 19:24:17 +01:00
Cosmin Cojocar 1735e5a9ac fix(G602): avoid false positives for range-over-array indexing (#1531)
This change fixes a false positive in G602 when iterating over
fixed-size arrays with range and indexing using the loop variable.

Corrects loop bound normalization in SSA-based index analysis so offsets
are not applied twice.
Preserves true-positive detection for real out-of-bounds patterns (for
example index + 1 at upper edge).
Adds regression samples covering both:
valid range-over-array indexing (no issue expected)
invalid shifted indexing inside the same loop (issue expected)

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-19 17:39:14 +01:00
Ravi Sastry Kadali bd11fbe2ba fix: taint analysis false positives with G703,G705 (#1522)
* fix: taint analysis false positives with G703,G705

* additional tests

* cross package coverage increase

* Add additonal G118 tests for codecov

* improve code coverage

* field-level taint tracking and test coverage

* add more tests

* improve test coverage

* fix unnecessary nosec comments for tool

* improve code coverage

* address codecov issues

* improve code coverage
2026-02-19 15:43:03 +01:00
Cosmin Cojocar 36ba72bb7f Add G121 analyzer for unsafe CORS bypass patterns in CrossOriginProtection (#1521)
* Add G121 analyzer for unsafe CORS bypass patterns in CrossOriginProtection

Adds new SSA-only analyzer G121 to detect unsafe usage of
AddInsecureBypassPattern in net/http.CrossOriginProtection.
Flags:
overbroad static bypass patterns (for example /, /*, empty/wildcard-like
values),
request-derived dynamic bypass patterns.
Wires G121 into default analyzer registration, analyzer test suite, CWE
mapping (CWE-346), README rule list, and dedicated sample fixtures.
Includes a narrow lint suppression for a G101 false positive in analyzer
message constants.
Validation: analyzer tests pass and golangci-lint reports 0 issues.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Ignore false positive warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

---------

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-16 15:59:57 +01:00
Cosmin Cojocar 238f982325 Add G120 SSA analyzer for unbounded form parsing in HTTP handlers (#1520)
Introduces new G120 to detect potential memory-exhaustion paths caused
by unbounded form parsing in HTTP handlers.
Uses a pure SSA implementation (no AST fallback), checking ParseForm,
ParseMultipartForm, FormValue, and PostFormValue on *http.Request.
Suppresses findings when request bodies are explicitly bounded with
http.MaxBytesReader.
Wires G120 into analyzer registration, README rule catalog, and CWE
mapping (CWE-400).
Adds focused vulnerable/safe samples and analyzer test coverage;
analyzer tests and lint pass.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-16 15:06:09 +01:00
Cosmin Cojocar 89cde277b5 Add G119 analyzer for unsafe redirect header propagation in CheckRedirect callbacks (#1519)
- Introduces a new G119 security rule to detect redirect policies that
can leak sensitive headers across origins.
- Flags direct request header replacement inside CheckRedirect callbacks
and explicit re-adding of sensitive headers (Authorization,
Proxy-Authorization, Cookie).
- Wires G119 into analyzer registration, README rule list, and CWE
mapping.
- Adds focused positive/negative samples and analyzer coverage; analyzer
package tests pass.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-16 14:40:53 +01:00
oittaa 14fdd9cb07 Fix G115 false positives and negatives (Issue #1501) (#1518)
Fixes false positives for guarded conversions in loops by excluding back-edge dominators from reachability check. Fixes false negatives for array/slice element conversions by preventing recursive range resolution through IndexAddr. Also fixes isNonNegative check for range loops.
2026-02-16 13:58:21 +01:00
Cosmin Cojocar 2b2077e921 Add G118 SSA analyzer for context propagation failures that can cause goroutine/resource leaks (#1516)
* Add G118 SSA analyzer for context propagation failures that can cause goroutine/resource leaks

This PR introduces G118, a new SSA-based gosec rule that detects
high-risk context misuse patterns: goroutines using
context.Background/TODO when request context exists, missing cancel()
calls from WithCancel/WithTimeout/WithDeadline, and unbounded blocking
loop regions without ctx.Done() guards.
These patterns can leak goroutines and I/O resources, leading to
resource exhaustion/DoS in production services.
The rule is mapped to CWE-400, integrated into analyzer registration and
docs, and includes positive/negative samples (including complex loop CFG
cases) to reduce false positives while preserving detection quality.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Fix false pasitive

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

---------

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-15 21:35:54 +01:00
Cosmin Cojocar a7666f3c70 Add G113: Detect HTTP Request Smuggling via conflicting headers (CVE-2025-22891, CWE-444) (#1515)
Implements a new SSA-based analyzer G113 to detect HTTP request
smuggling vulnerabilities caused by setting conflicting
Transfer-Encoding and Content-Length headers on the same HTTP response.

Addresses CVE-2025-22871 where ambiguous HTTP message parsing can lead
to request smuggling attacks. When both Transfer-Encoding: chunked and
Content-Length headers are set, intermediary proxies and backend servers
may disagree on message boundaries, allowing attackers to inject
malicious requests.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-15 18:48:01 +01:00
Cosmin Cojocar 47f8b52fb8 Add G408: SSH PublicKeyCallback Authentication Bypass Analyzer (#1513)
* Add G408: SSH PublicKeyCallback Authentication Bypass Analyzer

Implements a new SSA-based security analyzer (G408) that detects
stateful misuse of ssh.PublicKeyCallback in SSH server configurations.
This vulnerability can lead to authentication bypass where a server
authenticates one SSH key but performs authorization checks on a
different key.

This addresses a critical security vulnerability (CVE-2024-45337, CVSS
9.1) that has affected production systems including Kubernetes and other
SSH-based services. The vulnerability occurs when developers incorrectly
capture and modify state within PublicKeyCallback closures, enabling
attackers to authenticate with one key while the server operates on
another key's credentials.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Fix tests

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

---------

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-14 23:11:18 +01:00
Cosmin Cojocar 4f1f362671 Add more unit tests to improve coverage (#1512)
* Add more tests to improve test coverage

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Fix lint warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* fix lint warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Fix lint warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Fix lint warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

* Fix lint warnings

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>

---------

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-14 21:57:51 +01:00
Cosmin Cojocar 993c1c4da2 Fix incorrect detection of fixed iv in G407 (#1509)
Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-14 14:15:55 +01:00
Cosmin Cojocar 8668b74892 Add support for go 1.26.x and removed support for go 1.24.x (#1508)
We keep support only for two major version.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2026-02-14 13:53:19 +01:00
Ravi Sastry Kadali 000384e510 fix: broken taint analysis causing false positives (#1506)
* fix: broken taint analysis causing false positives

* add tests and improve code coverage
2026-02-14 12:24:33 +01:00
Ravi Sastry Kadali 616192c9d9 fix: panic on float constants in overflow analyzer (#1505) 2026-02-14 12:16:41 +01:00
Ravi Sastry Kadali 5736e8b88b fix: G602 false positive for array element access (#1499)
Fixes #1495
2026-02-13 11:53:55 +01:00
Ravi Sastry Kadali 398ad549bb feat: Support for adding taint analysis engine (#1486)
* feat: add taint analysis engine for data flow security

Implements SSA-based taint analysis to detect security vulnerabilities:
- G701: SQL injection via string concatenation
- G702: Command injection via user input
- G703: Path traversal via user input
- G704: SSRF via user-controlled URLs
- G705: XSS via unescaped user input
- G706: Log injection via user input

Uses golang.org/x/tools for SSA/call graph analysis with CHA.
Zero external dependencies beyond existing gosec imports.
2026-02-10 15:47:11 +01:00
Ravi Sastry Kadali eb252ba8d7 Fix G602 analyzer panic that kills gosec process (#1491)
* update go version to 1.25.7

* Fix G602 analyzer panic that kills gosec process

* guard against nil block

* add tests for nil guard fixes
2026-02-07 11:30:59 +01:00
oittaa ade0e8f432 refactor: optimize nosec parsing and reduce allocations (#1478)
- Replace dynamic fmt.Errorf with static errors in hot paths
- Replace regex-based directive parsing with manual string parsing (removed regexp import)
- Use const for directive prefix
2026-01-25 12:35:59 +01:00
oittaa bd3c738bf0 G115: Enhance RangeAnalyzer with constant propagation and chained arithmetic support (#1470)
* G115: Enhance RangeAnalyzer with constant propagation and chained arithmetic support

* Fix G115 overflow detection for negated values and robustify RangeAnalyzer propagation
2026-01-19 17:56:26 +01:00
oittaa 7284e15230 Refactor Analyzers: Unify Range Logic & Optimize Allocations (#1464)
* refactor

* optimizations

* Refactor analyzers: unify range logic and optimize allocations- Centralize numeric range analysis in util.go (shared by G115/G602).- Implement object pooling for slice_bounds and hardcoded_nonce.- Update conversion_overflow tests to use real analyzer logic.

* Refactor RangeAnalyzer
2026-01-14 10:52:35 +01:00
oittaa 7a4ccefd88 Optimize G115, G602, G407 analyzers to reduce allocations and memory (#1463)
* Optimize G115, G602, G407 analyzers to reduce allocations and memory

* improve G407 coverage
2026-01-13 19:00:33 +01:00
oittaa 833d7919e0 refactor(g115): improve coverage (#1462) 2026-01-12 11:37:18 +01:00
oittaa 0cc9e01a9d Refine G407 to improve detection and coverage of hardcoded nonces (#1460)
* Refine G407 to improve detection and coverage of hardcoded nonces

* chore: consolidate common analyzer patterns into util.go and improve G602 coverage

* Optimize G602 and G115 with state caching and regex pre-compilation

* Improve G115 overflow detection and fix false positives and false negatives

* golangci-lint workaround
2026-01-12 09:56:55 +01:00
oittaa 52f5dbf4d4 feat(slice): enhance slice bounds analysis with dynamic bounds handling (#1457)
* feat(slice): enhance slice bounds analysis with dynamic bounds handling

* feat(slice): enhance extractLenBound to support additional offset patterns and improve slice bounds analysis

* golangci-lint run

* Improve G602 slice bounds detection: support 3-index slices and correct capacity tracking

* Support out-of-bounds detection for range loops with offsets
2026-01-09 13:52:05 +01:00
Cosmin Cojocar c073629009 Improve slice bound check (#1442)
Improve slice bound check to habdle bounded values and properly parse
the address index only from references

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
2025-12-28 19:39:40 +02:00
kondratevandKondratev Pavel 01029f0a74 check nil slices, partially check bounds (#1396)
* check nil slices, partially check bounds

* add tests, cleanup, add fixed array

* cleanup

* lint

* looks like go bug, add second check

* ohh

* check instruction position

---------

Co-authored-by: Kondratev Pavel <kondratev_pa@magnit.ru>
2025-10-03 10:41:33 +02:00