Skip to content

Commit

Permalink
Remove deprecated nodejs-protect agent, use nodejs or nodejs-esm inst…
Browse files Browse the repository at this point in the history
…read
  • Loading branch information
gamingrobot committed Jan 15, 2025
1 parent cf7de79 commit 7bff737
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 142 deletions.
12 changes: 0 additions & 12 deletions Contrast.K8s.AgentOperator.v3.ncrunchsolution

This file was deleted.

1 change: 0 additions & 1 deletion docs/public/02-supported-technologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
| NodeJS ESM | nodejs-esm | Beta | [Supported NodeJS technologies](https://docs.contrastsecurity.com/en/node-js-supported-technologies.html ) |
| PHP | php | Beta | [Supported PHP technologies](https://docs.contrastsecurity.com/en/php-supported-technologies.html) |
| Python | python | Beta | [Supported Python technologies](https://docs.contrastsecurity.com/en/python-supported-technologies.html) |
| NodeJS (Protect only) | nodejs-protect | Deprecated | [Supported NodeJS technologies](https://docs.contrastsecurity.com/en/node-js-supported-technologies.html ) |

- Injection of NodeJS and PHP applications is in beta. Beta status means the feature might change or act unexpectedly. By using this feature, you agree to the [Contrast Beta Terms and Conditions](https://docs.contrastsecurity.com/en/beta-terms-and-conditions.html "Contrast Beta Terms and Conditions").
- Injection of the NodeJS Agent may result in a substantial increase in the startup time of the instrumented application. If startup time is unacceptable, injecting the agent during compilation may be desireable. If the application was injected by the NodeJS agent during compilation then injection during runtime by the operator should be disabled. See the [rewriter CLI](https://docs.contrastsecurity.com/en/node-js-agent-rewriter-cli.html) for more information.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ resources:
- ./injection-javatooloptions.yaml
- ./injection-nodejs-cjs.yaml
- ./injection-nodejs-esm.yaml
- ./injection-nodejs-protect.yaml
- ./injection-php.yaml
- ./injection-python.yaml
- ./missing-deps.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
type: string
type:
description: The type of agent to inject. Can be one of ['dotnet-core', 'java', 'nodejs', 'nodejs-esm', 'php', 'python']. Required.
pattern: ^(dotnet-core|dotnet|java|node|nodejs|node-esm|nodejs-esm|node-protect|nodejs-protect|php|personal-home-page|python|dummy)$
pattern: ^(dotnet-core|dotnet|java|node|nodejs|node-esm|nodejs-esm|php|personal-home-page|python|dummy)$
type: string
image:
description: Overrides the default agent images.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public string GetDefaultImageName(AgentInjectionType type)
AgentInjectionType.Java => "agent-java",
AgentInjectionType.NodeJs => "agent-nodejs",
AgentInjectionType.NodeJsEsm => "agent-nodejs",
AgentInjectionType.NodeJsProtect => "agent-nodejs-protect",
AgentInjectionType.Php => "agent-php",
AgentInjectionType.Python => "agent-python",
AgentInjectionType.Dummy => "busybox",
Expand All @@ -57,10 +56,8 @@ public AgentInjectionType GetTypeFromString(string type)
"java" => AgentInjectionType.Java,
"node" => AgentInjectionType.NodeJs,
"node-esm" => AgentInjectionType.NodeJsEsm,
"node-protect" => AgentInjectionType.NodeJsProtect,
"nodejs" => AgentInjectionType.NodeJs,
"nodejs-esm" => AgentInjectionType.NodeJsEsm,
"nodejs-protect" => AgentInjectionType.NodeJsProtect,
"php" => AgentInjectionType.Php,
"personal-home-page" => AgentInjectionType.Php,
"python" => AgentInjectionType.Python,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public enum AgentInjectionType
Java,
NodeJs,
NodeJsEsm,
NodeJsProtect, //deprecated
Php,
Python,
Dummy
Expand Down
2 changes: 1 addition & 1 deletion src/Contrast.K8s.AgentOperator/Entities/RegexConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Contrast.K8s.AgentOperator.Entities;
public static class RegexConstants
{
[RegexPattern]
public const string AgentTypeRegex = @"^(dotnet-core|dotnet|java|node|nodejs|node-esm|nodejs-esm|node-protect|nodejs-protect|php|personal-home-page|python|dummy)$";
public const string AgentTypeRegex = @"^(dotnet-core|dotnet|java|node|nodejs|node-esm|nodejs-esm|php|personal-home-page|python|dummy)$";

[RegexPattern]
public const string InjectorVersionRegex = @"^(latest|(\d+(\.\d+){0,3}(-.+)?))$";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public class RegexConstantsTests
[InlineData("nodejs")]
[InlineData("node-esm")]
[InlineData("nodejs-esm")]
[InlineData("node-protect")]
[InlineData("nodejs-protect")]
[InlineData("php")]
[InlineData("personal-home-page")]
[InlineData("python")]
Expand Down

0 comments on commit 7bff737

Please sign in to comment.