fix(config): keep v5 IAST programmatic aliases working#8457
Merged
Conversation
Contributor
Overall package sizeSelf size: 5.82 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
✨ Fix all issues with BitsAI or with Cursor
|
v5 keeps the deprecated `iast.securityControlsConfiguration` and `experimental.iast.*` programmatic options. After the v6 type/config gating, both surfaces drifted out of sync. Two related bugs are fixed: 1. `defaults.js` rewrote `DD_IAST_SECURITY_CONTROLS_CONFIGURATION` in the cached supported-configurations object on every load. The second load saw the already-mutated entry, wrote `[undefined, 'experimental.iast.securityControlsConfiguration']` into `configurationNames`, and `addOption` crashed on `name.indexOf` across every spec that reloads the config module. 2. `eslint-config-names-sync` reported every `experimental.iast.*` name as missing from `index.d.ts`, since v5's public type surface no longer carries the deprecated alias. `applyV5Overrides` now reuses the existing `configurationNames[0]` when `internalPropertyName` is already gone, so repeated calls on the same `supportedConfigurations` object stay safe. The lint rule treats `experimental.iast` and `experimental.iast.*` the same way it already treats `experimental.appsec.*`: visible to env-tag resolution, ignored by the JSON-vs-types parity check.
458910c to
2f09a93
Compare
BenchmarksBenchmark execution time: 2026-05-13 09:38:59 Comparing candidate commit bf18cfb in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1498 metrics, 95 unstable metrics. |
uurien
approved these changes
May 13, 2026
dd-octo-sts Bot
pushed a commit
that referenced
this pull request
May 13, 2026
v5 keeps the deprecated `iast.securityControlsConfiguration` and `experimental.iast.*` programmatic options. After the v6 type/config gating, both surfaces drifted out of sync. Two related bugs are fixed: 1. `defaults.js` rewrote `DD_IAST_SECURITY_CONTROLS_CONFIGURATION` in the cached supported-configurations object on every load. The second load saw the already-mutated entry, wrote `[undefined, 'experimental.iast.securityControlsConfiguration']` into `configurationNames`, and `addOption` crashed on `name.indexOf` across every spec that reloads the config module. 2. `eslint-config-names-sync` reported every `experimental.iast.*` name as missing from `index.d.ts`, since v5's public type surface no longer carries the deprecated alias. `applyV5Overrides` now reuses the existing `configurationNames[0]` when `internalPropertyName` is already gone, so repeated calls on the same `supportedConfigurations` object stay safe. The lint rule treats `experimental.iast` and `experimental.iast.*` the same way it already treats `experimental.appsec.*`: visible to env-tag resolution, ignored by the JSON-vs-types parity check.
Merged
rochdev
pushed a commit
that referenced
this pull request
May 13, 2026
v5 keeps the deprecated `iast.securityControlsConfiguration` and `experimental.iast.*` programmatic options. After the v6 type/config gating, both surfaces drifted out of sync. Two related bugs are fixed: 1. `defaults.js` rewrote `DD_IAST_SECURITY_CONTROLS_CONFIGURATION` in the cached supported-configurations object on every load. The second load saw the already-mutated entry, wrote `[undefined, 'experimental.iast.securityControlsConfiguration']` into `configurationNames`, and `addOption` crashed on `name.indexOf` across every spec that reloads the config module. 2. `eslint-config-names-sync` reported every `experimental.iast.*` name as missing from `index.d.ts`, since v5's public type surface no longer carries the deprecated alias. `applyV5Overrides` now reuses the existing `configurationNames[0]` when `internalPropertyName` is already gone, so repeated calls on the same `supportedConfigurations` object stay safe. The lint rule treats `experimental.iast` and `experimental.iast.*` the same way it already treats `experimental.appsec.*`: visible to env-tag resolution, ignored by the JSON-vs-types parity check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v5 keeps the deprecated
iast.securityControlsConfigurationandexperimental.iast.*programmatic options. After the v6type/config gating,
defaults.jsrewroteDD_IAST_SECURITY_CONTROLS_CONFIGURATIONin the cachedsupported-configurations object on every load, so the second
reload wrote
[undefined, 'experimental.iast.securityControlsConfiguration']intoconfigurationNamesand crashedaddOptiononname.indexOfacross every spec that reloads the config module.
eslint-config-names-syncalso flagged the survivingexperimental.iast.*aliases as missing fromindex.d.ts.applyV5Overridesnow reuses the existingconfigurationNames[0]wheninternalPropertyNameis alreadygone, and the lint rule treats
experimental.iast.*the sameway it already treats
experimental.appsec.*— visible toenv-tag resolution, ignored by the JSON-vs-types parity check.