mobbdev 1.4.2 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,6 +94,9 @@ function getSdk(client, withWrapper = defaultWrapper) {
94
94
  performCliLogin(variables, requestHeaders, signal) {
95
95
  return withWrapper((wrappedRequestHeaders) => client.request({ document: PerformCliLoginDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "performCliLogin", "mutation", variables);
96
96
  },
97
+ SetQuarantineEnabled(variables, requestHeaders, signal) {
98
+ return withWrapper((wrappedRequestHeaders) => client.request({ document: SetQuarantineEnabledDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "SetQuarantineEnabled", "mutation", variables);
99
+ },
97
100
  CreateProject(variables, requestHeaders, signal) {
98
101
  return withWrapper((wrappedRequestHeaders) => client.request({ document: CreateProjectDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "CreateProject", "mutation", variables);
99
102
  },
@@ -135,7 +138,7 @@ function getSdk(client, withWrapper = defaultWrapper) {
135
138
  }
136
139
  };
137
140
  }
138
- var AiBlameInferenceType, FixQuestionInputType, Language, ManifestAction, Effort_To_Apply_Fix_Enum, Fix_Rating_Tag_Enum, Fix_Report_State_Enum, Fix_State_Enum, IssueLanguage_Enum, IssueType_Enum, Pr_Status_Enum, Project_Role_Type_Enum, Vulnerability_Report_Issue_Category_Enum, Vulnerability_Report_Issue_State_Enum, Vulnerability_Report_Issue_Tag_Enum, Vulnerability_Report_Vendor_Enum, Vulnerability_Severity_Enum, FixDetailsFragmentDoc, FixReportSummaryFieldsFragmentDoc, MeDocument, GetLastOrgAndNamedProjectDocument, GetLastOrgDocument, GetEncryptedApiTokenDocument, FixReportStateDocument, GetVulnerabilityReportPathsDocument, GetAnalysisSubscriptionDocument, GetAnalysisDocument, GetFixesDocument, GetVulByNodesMetadataDocument, GetFalsePositiveDocument, UpdateScmTokenDocument, UploadS3BucketInfoDocument, GetTracyDiffUploadUrlDocument, AnalyzeCommitForExtensionAiBlameDocument, GetAiBlameInferenceDocument, GetAiBlameAttributionPromptDocument, GetPromptSummaryDocument, UploadAiBlameInferencesInitDocument, FinalizeAiBlameInferencesUploadDocument, UploadTracyRecordsDocument, GetTracyRawDataUploadUrlDocument, DigestVulnerabilityReportDocument, SubmitVulnerabilityReportDocument, CreateCommunityUserDocument, CreateCliLoginDocument, PerformCliLoginDocument, CreateProjectDocument, ValidateRepoUrlDocument, GitReferenceDocument, AutoPrAnalysisDocument, GetFixReportsByRepoUrlDocument, GetReportFixesDocument, GetLatestReportByRepoUrlDocument, UpdateDownloadedFixDataDocument, GetUserMvsAutoFixDocument, StreamBlameAiAnalysisRequestsDocument, StreamCommitBlameRequestsDocument, ScanSkillDocument, SkillVerdictsByMd5Document, defaultWrapper;
141
+ var AiBlameInferenceType, FixQuestionInputType, Language, ManifestAction, Effort_To_Apply_Fix_Enum, Fix_Rating_Tag_Enum, Fix_Report_State_Enum, Fix_State_Enum, IssueLanguage_Enum, IssueType_Enum, Pr_Status_Enum, Project_Role_Type_Enum, Vulnerability_Report_Issue_Category_Enum, Vulnerability_Report_Issue_State_Enum, Vulnerability_Report_Issue_Tag_Enum, Vulnerability_Report_Vendor_Enum, Vulnerability_Severity_Enum, FixDetailsFragmentDoc, FixReportSummaryFieldsFragmentDoc, MeDocument, GetLastOrgAndNamedProjectDocument, GetLastOrgDocument, GetEncryptedApiTokenDocument, FixReportStateDocument, GetVulnerabilityReportPathsDocument, GetAnalysisSubscriptionDocument, GetAnalysisDocument, GetFixesDocument, GetVulByNodesMetadataDocument, GetFalsePositiveDocument, UpdateScmTokenDocument, UploadS3BucketInfoDocument, GetTracyDiffUploadUrlDocument, AnalyzeCommitForExtensionAiBlameDocument, GetAiBlameInferenceDocument, GetAiBlameAttributionPromptDocument, GetPromptSummaryDocument, UploadAiBlameInferencesInitDocument, FinalizeAiBlameInferencesUploadDocument, UploadTracyRecordsDocument, GetTracyRawDataUploadUrlDocument, DigestVulnerabilityReportDocument, SubmitVulnerabilityReportDocument, CreateCommunityUserDocument, CreateCliLoginDocument, PerformCliLoginDocument, SetQuarantineEnabledDocument, CreateProjectDocument, ValidateRepoUrlDocument, GitReferenceDocument, AutoPrAnalysisDocument, GetFixReportsByRepoUrlDocument, GetReportFixesDocument, GetLatestReportByRepoUrlDocument, UpdateDownloadedFixDataDocument, GetUserMvsAutoFixDocument, StreamBlameAiAnalysisRequestsDocument, StreamCommitBlameRequestsDocument, ScanSkillDocument, SkillVerdictsByMd5Document, defaultWrapper;
139
142
  var init_client_generates = __esm({
140
143
  "src/features/analysis/scm/generates/client_generates.ts"() {
141
144
  "use strict";
@@ -260,6 +263,7 @@ var init_client_generates = __esm({
260
263
  IssueType_Enum2["HttpParameterPollution"] = "HTTP_PARAMETER_POLLUTION";
261
264
  IssueType_Enum2["HttpResponseSplitting"] = "HTTP_RESPONSE_SPLITTING";
262
265
  IssueType_Enum2["IframeWithoutSandbox"] = "IFRAME_WITHOUT_SANDBOX";
266
+ IssueType_Enum2["ImproperCertificateValidation"] = "IMPROPER_CERTIFICATE_VALIDATION";
263
267
  IssueType_Enum2["ImproperExceptionHandling"] = "IMPROPER_EXCEPTION_HANDLING";
264
268
  IssueType_Enum2["ImproperResourceShutdownOrRelease"] = "IMPROPER_RESOURCE_SHUTDOWN_OR_RELEASE";
265
269
  IssueType_Enum2["ImproperStringFormatting"] = "IMPROPER_STRING_FORMATTING";
@@ -278,6 +282,7 @@ var init_client_generates = __esm({
278
282
  IssueType_Enum2["InsecureTmpFile"] = "INSECURE_TMP_FILE";
279
283
  IssueType_Enum2["InsecureUuidVersion"] = "INSECURE_UUID_VERSION";
280
284
  IssueType_Enum2["InsufficientLogging"] = "INSUFFICIENT_LOGGING";
285
+ IssueType_Enum2["J2EeGetConnection"] = "J2EE_GET_CONNECTION";
281
286
  IssueType_Enum2["JqueryDeprecatedSymbols"] = "JQUERY_DEPRECATED_SYMBOLS";
282
287
  IssueType_Enum2["LeftoverDebugCode"] = "LEFTOVER_DEBUG_CODE";
283
288
  IssueType_Enum2["LocaleDependentComparison"] = "LOCALE_DEPENDENT_COMPARISON";
@@ -941,6 +946,12 @@ var init_client_generates = __esm({
941
946
  level
942
947
  justification
943
948
  }
949
+ appliedSkills
950
+ mcpCalls {
951
+ mcpServer
952
+ mcpTool
953
+ callCount
954
+ }
944
955
  }
945
956
  }
946
957
  ... on PromptSummaryProcessing {
@@ -1092,6 +1103,13 @@ var init_client_generates = __esm({
1092
1103
  performCliLogin(loginId: $loginId) {
1093
1104
  status
1094
1105
  }
1106
+ }
1107
+ `;
1108
+ SetQuarantineEnabledDocument = `
1109
+ mutation SetQuarantineEnabled($enabled: Boolean!) {
1110
+ update_organization(where: {}, _set: {quarantineEnabled: $enabled}) {
1111
+ affected_rows
1112
+ }
1095
1113
  }
1096
1114
  `;
1097
1115
  CreateProjectDocument = `
@@ -1277,12 +1295,15 @@ var init_client_generates = __esm({
1277
1295
  SkillVerdictsByMd5Document = `
1278
1296
  query SkillVerdictsByMd5($md5s: [String!]!) {
1279
1297
  skillVerdictsByMd5(md5s: $md5s) {
1280
- md5
1281
- verdict
1282
- summary
1283
- scannerName
1284
- scannerVersion
1285
- scannedAt
1298
+ quarantineEnabled
1299
+ verdicts {
1300
+ md5
1301
+ verdict
1302
+ summary
1303
+ scannerName
1304
+ scannerVersion
1305
+ scannedAt
1306
+ }
1286
1307
  }
1287
1308
  }
1288
1309
  `;
@@ -1708,6 +1729,7 @@ var init_getIssueType = __esm({
1708
1729
  ["NO_EQUIVALENCE_METHOD" /* NoEquivalenceMethod */]: "Class Does Not Implement Equivalence Method",
1709
1730
  ["INFORMATION_EXPOSURE_VIA_HEADERS" /* InformationExposureViaHeaders */]: "Information Exposure via Headers",
1710
1731
  ["DEBUG_ENABLED" /* DebugEnabled */]: "Debug Enabled",
1732
+ ["J2EE_GET_CONNECTION" /* J2EeGetConnection */]: "J2EE Bad Practices: getConnection()",
1711
1733
  ["LEFTOVER_DEBUG_CODE" /* LeftoverDebugCode */]: "Leftover Debug Code",
1712
1734
  ["POOR_ERROR_HANDLING_EMPTY_CATCH_BLOCK" /* PoorErrorHandlingEmptyCatchBlock */]: "Poor Error Handling: Empty Catch Block",
1713
1735
  ["ERRONEOUS_STRING_COMPARE" /* ErroneousStringCompare */]: "Erroneous String Compare",
@@ -1782,7 +1804,8 @@ var init_getIssueType = __esm({
1782
1804
  ["TAINTED_NUMERIC_CAST" /* TaintedNumericCast */]: "Tainted Numeric Cast",
1783
1805
  ["MISSING_X_FRAME_OPTIONS" /* MissingXFrameOptions */]: "Missing X-Frame-Options Header",
1784
1806
  ["IMPROPER_VALIDATION_OF_ARRAY_INDEX" /* ImproperValidationOfArrayIndex */]: "Improper Validation of Array Index",
1785
- ["INCORRECT_INTEGER_CONVERSION" /* IncorrectIntegerConversion */]: "Incorrect Integer Conversion"
1807
+ ["INCORRECT_INTEGER_CONVERSION" /* IncorrectIntegerConversion */]: "Incorrect Integer Conversion",
1808
+ ["IMPROPER_CERTIFICATE_VALIDATION" /* ImproperCertificateValidation */]: "Improper Certificate Validation"
1786
1809
  };
1787
1810
  issueTypeZ = z5.nativeEnum(IssueType_Enum);
1788
1811
  getIssueTypeFriendlyString = (issueType) => {
@@ -4852,6 +4875,7 @@ var fixDetailsData = {
4852
4875
  issueDescription: "A data member and a function have the same name which can be confusing to the developer.",
4853
4876
  fixInstructions: "Rename the data member to avoid confusion."
4854
4877
  },
4878
+ ["J2EE_GET_CONNECTION" /* J2EeGetConnection */]: void 0,
4855
4879
  ["LEFTOVER_DEBUG_CODE" /* LeftoverDebugCode */]: void 0,
4856
4880
  ["UNVALIDATED_PUBLIC_METHOD_ARGUMENT" /* UnvalidatedPublicMethodArgument */]: void 0,
4857
4881
  ["ERRONEOUS_STRING_COMPARE" /* ErroneousStringCompare */]: void 0,
@@ -4954,7 +4978,8 @@ var fixDetailsData = {
4954
4978
  ["TAINTED_NUMERIC_CAST" /* TaintedNumericCast */]: void 0,
4955
4979
  ["MISSING_X_FRAME_OPTIONS" /* MissingXFrameOptions */]: void 0,
4956
4980
  ["IMPROPER_VALIDATION_OF_ARRAY_INDEX" /* ImproperValidationOfArrayIndex */]: void 0,
4957
- ["INCORRECT_INTEGER_CONVERSION" /* IncorrectIntegerConversion */]: void 0
4981
+ ["INCORRECT_INTEGER_CONVERSION" /* IncorrectIntegerConversion */]: void 0,
4982
+ ["IMPROPER_CERTIFICATE_VALIDATION" /* ImproperCertificateValidation */]: void 0
4958
4983
  };
4959
4984
 
4960
4985
  // src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
@@ -5031,6 +5056,31 @@ var go_default = vulnerabilities3;
5031
5056
  // src/features/analysis/scm/shared/src/storedFixData/java/index.ts
5032
5057
  init_client_generates();
5033
5058
 
5059
+ // src/features/analysis/scm/shared/src/storedFixData/java/j2eeGetConnection.ts
5060
+ var j2eeGetConnection = {
5061
+ guidance: () => `This fix replaces direct \`DriverManager.getConnection(...)\` calls with a container-managed JNDI \`DataSource\` lookup. The new code expects the app server (Tomcat / WildFly / WebSphere / etc.) to expose a configured connection pool under the JNDI name you specified.
5062
+
5063
+
5064
+  
5065
+
5066
+ ***Make sure the resource pool exists before merging.*** The patched code will throw a \`NamingException\` at runtime if the JNDI name does not resolve. Configure it in your container's resource definition:
5067
+
5068
+ - **Tomcat**: declare a \`<Resource>\` element in \`context.xml\` (or per-app \`META-INF/context.xml\`) with the same JNDI name, plus \`url\`, \`username\`, \`password\`, \`driverClassName\`, and any pool sizing.
5069
+ - **Spring Boot (embedded Tomcat)**: configure via \`spring.datasource.jndi-name\` and matching \`<Resource>\`, or use \`@ConfigurationProperties\` to bind a \`DataSource\` bean.
5070
+ - **WildFly / JBoss EAP**: declare a \`<datasource>\` in the standalone/domain XML and reference its JNDI binding.
5071
+ - **WebSphere / WebLogic**: define the JDBC provider and data source through the admin console; bind it to the JNDI name.
5072
+
5073
+
5074
+ &nbsp;
5075
+
5076
+ Also add a matching \`<resource-ref>\` (or \`<data-source>\`) in your \`WEB-INF/web.xml\` if you use one. The original connection details (URL, user, password) move from the call site into the resource definition \u2014 remove them from any constants / properties files where they were duplicated.
5077
+
5078
+
5079
+ &nbsp;
5080
+
5081
+ This fix is mandated by the J2EE / Jakarta EE specification (CWE-245) \u2014 direct driver management bypasses the container's pooling, retry, and failover policies.`
5082
+ };
5083
+
5034
5084
  // src/features/analysis/scm/shared/src/storedFixData/java/sqlInjection.ts
5035
5085
  var sqlInjection = {
5036
5086
  guidance: ({
@@ -5058,6 +5108,7 @@ var systemInformationLeak = {
5058
5108
  // src/features/analysis/scm/shared/src/storedFixData/java/index.ts
5059
5109
  var vulnerabilities4 = {
5060
5110
  ["PASSWORD_IN_COMMENT" /* PasswordInComment */]: passwordInComment,
5111
+ ["J2EE_GET_CONNECTION" /* J2EeGetConnection */]: j2eeGetConnection,
5061
5112
  ["SQL_Injection" /* SqlInjection */]: sqlInjection,
5062
5113
  ["SYSTEM_INFORMATION_LEAK" /* SystemInformationLeak */]: systemInformationLeak
5063
5114
  };
@@ -5142,10 +5193,24 @@ See more information [here](https://jinja.palletsprojects.com/en/3.1.x/templates
5142
5193
  ***Note: make sure that none of the data you're marking as safe is coming from user input, as this can lead to XSS vulnerabilities!***`
5143
5194
  };
5144
5195
 
5196
+ // src/features/analysis/scm/shared/src/storedFixData/python/improperCertificateValidation.ts
5197
+ var improperCertificateValidation = {
5198
+ guidance: () => `This fix re-enables TLS certificate validation by changing \`verify=False\` to \`verify=True\` on the HTTP request. Any call that was deliberately reaching a server with a self-signed, expired, or otherwise untrusted certificate will start raising \`ssl.SSLError\` / \`requests.exceptions.SSLError\` after this change.
5199
+
5200
+ &nbsp;
5201
+
5202
+ ***Before merging, confirm that every endpoint reached by this call presents a certificate signed by a trusted CA.*** If the call must talk to an internal service that uses a private CA, prefer pointing \`verify\` at the CA bundle (\`verify="/path/to/ca.pem"\`) over disabling validation. If the certificate cannot be trusted at all, the safe fix is to terminate that connection at a properly configured proxy, not to keep it unvalidated.
5203
+
5204
+ &nbsp;
5205
+
5206
+ See the [\`requests\` SSL verification docs](https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification) for the supported \`verify\` values.`
5207
+ };
5208
+
5145
5209
  // src/features/analysis/scm/shared/src/storedFixData/python/index.ts
5146
5210
  var vulnerabilities7 = {
5147
5211
  ["AUTO_ESCAPE_FALSE" /* AutoEscapeFalse */]: autoEscapeFalse,
5148
- ["CSRF" /* Csrf */]: csrf
5212
+ ["CSRF" /* Csrf */]: csrf,
5213
+ ["IMPROPER_CERTIFICATE_VALIDATION" /* ImproperCertificateValidation */]: improperCertificateValidation
5149
5214
  };
5150
5215
  var python_default = vulnerabilities7;
5151
5216
 
@@ -5681,6 +5746,15 @@ var insecureCookie2 = {
5681
5746
  }
5682
5747
  };
5683
5748
 
5749
+ // src/features/analysis/scm/shared/src/storedQuestionData/java/j2eeGetConnection.ts
5750
+ var j2eeGetConnection2 = {
5751
+ jndiResourceName: {
5752
+ content: () => "What JNDI name is the database connection pool registered under?",
5753
+ description: () => 'We need the JNDI name your app server uses to expose its container-managed `DataSource`. The fix performs `new InitialContext().lookup(<jndi-name>)` to retrieve the pool, so this value must exactly match the resource definition (e.g. `<Resource name="...">` in Tomcat `context.xml`, or the binding declared in WildFly / WebSphere / WebLogic). The default `java:comp/env/jdbc/myDataSource` is the canonical Tomcat / Spring convention; replace it with whatever your environment uses.',
5754
+ guidance: () => ""
5755
+ }
5756
+ };
5757
+
5684
5758
  // src/features/analysis/scm/shared/src/storedQuestionData/java/leftoverDebugCode.ts
5685
5759
  var leftoverDebugCode = {
5686
5760
  isCodeUsed: {
@@ -6009,6 +6083,7 @@ var vulnerabilities12 = {
6009
6083
  ["UNCHECKED_LOOP_CONDITION" /* UncheckedLoopCondition */]: uncheckedLoopCondition,
6010
6084
  ["INSECURE_COOKIE" /* InsecureCookie */]: insecureCookie2,
6011
6085
  ["TRUST_BOUNDARY_VIOLATION" /* TrustBoundaryViolation */]: trustBoundaryViolation2,
6086
+ ["J2EE_GET_CONNECTION" /* J2EeGetConnection */]: j2eeGetConnection2,
6012
6087
  ["LEFTOVER_DEBUG_CODE" /* LeftoverDebugCode */]: leftoverDebugCode,
6013
6088
  ["ERRONEOUS_STRING_COMPARE" /* ErroneousStringCompare */]: erroneousStringCompare,
6014
6089
  ["DUPLICATED_STRINGS" /* DuplicatedStrings */]: duplicatedStrings
@@ -7282,6 +7357,7 @@ var GQLClient = class {
7282
7357
  return await this._clientSdk.ScanSkill(variables);
7283
7358
  }
7284
7359
  // T-467 — batched verdict lookup for the client-side quarantine check.
7360
+ // T-493 — response is the envelope `{ quarantineEnabled, verdicts }`.
7285
7361
  async skillVerdictsByMd5(md5s) {
7286
7362
  return await this._clientSdk.SkillVerdictsByMd5({ md5s });
7287
7363
  }
@@ -7428,7 +7504,11 @@ async function sanitizeDataWithCounts(obj, options) {
7428
7504
  if (typeof data === "string") {
7429
7505
  return sanitizeString(data);
7430
7506
  } else if (Array.isArray(data)) {
7431
- return Promise.all(data.map((item) => sanitizeRecursive(item)));
7507
+ const results = [];
7508
+ for (const item of data) {
7509
+ results.push(await sanitizeRecursive(item));
7510
+ }
7511
+ return results;
7432
7512
  } else if (data instanceof Error) {
7433
7513
  return data;
7434
7514
  } else if (data instanceof Date) {