mobbdev 1.0.63 → 1.0.65

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.
Files changed (2) hide show
  1. package/dist/index.mjs +25 -6
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -54,6 +54,7 @@ var Language = /* @__PURE__ */ ((Language2) => {
54
54
  Language2["Python"] = "PYTHON";
55
55
  Language2["Sql"] = "SQL";
56
56
  Language2["Xml"] = "XML";
57
+ Language2["Yaml"] = "YAML";
57
58
  return Language2;
58
59
  })(Language || {});
59
60
  var ManifestAction = /* @__PURE__ */ ((ManifestAction2) => {
@@ -105,6 +106,7 @@ var IssueLanguage_Enum = /* @__PURE__ */ ((IssueLanguage_Enum2) => {
105
106
  IssueLanguage_Enum2["Python"] = "Python";
106
107
  IssueLanguage_Enum2["Sql"] = "SQL";
107
108
  IssueLanguage_Enum2["Xml"] = "XML";
109
+ IssueLanguage_Enum2["Yaml"] = "YAML";
108
110
  return IssueLanguage_Enum2;
109
111
  })(IssueLanguage_Enum || {});
110
112
  var IssueType_Enum = /* @__PURE__ */ ((IssueType_Enum2) => {
@@ -125,6 +127,7 @@ var IssueType_Enum = /* @__PURE__ */ ((IssueType_Enum2) => {
125
127
  IssueType_Enum2["ErroneousStringCompare"] = "ERRONEOUS_STRING_COMPARE";
126
128
  IssueType_Enum2["ErrorCondtionWithoutAction"] = "ERROR_CONDTION_WITHOUT_ACTION";
127
129
  IssueType_Enum2["FrameableLoginPage"] = "FRAMEABLE_LOGIN_PAGE";
130
+ IssueType_Enum2["GhActionsShellInjection"] = "GH_ACTIONS_SHELL_INJECTION";
128
131
  IssueType_Enum2["GraphqlDepthLimit"] = "GRAPHQL_DEPTH_LIMIT";
129
132
  IssueType_Enum2["HardcodedDomainInHtml"] = "HARDCODED_DOMAIN_IN_HTML";
130
133
  IssueType_Enum2["HardcodedSecrets"] = "HARDCODED_SECRETS";
@@ -1140,7 +1143,8 @@ var issueTypeMap = {
1140
1143
  ["MISSING_SSL_MINVERSION" /* MissingSslMinversion */]: "Missing SSL MinVersion",
1141
1144
  ["WEBSOCKET_MISSING_ORIGIN_CHECK" /* WebsocketMissingOriginCheck */]: "Missing Websocket Origin Check",
1142
1145
  ["DUPLICATED_STRINGS" /* DuplicatedStrings */]: "String Literals Should not Be Duplicated",
1143
- ["INSECURE_UUID_VERSION" /* InsecureUuidVersion */]: "Insecure UUID Version"
1146
+ ["INSECURE_UUID_VERSION" /* InsecureUuidVersion */]: "Insecure UUID Version",
1147
+ ["GH_ACTIONS_SHELL_INJECTION" /* GhActionsShellInjection */]: "GitHub Actions Shell Injection"
1144
1148
  };
1145
1149
  var issueTypeZ = z5.nativeEnum(IssueType_Enum);
1146
1150
  var getIssueTypeFriendlyString = (issueType) => {
@@ -2086,7 +2090,8 @@ var fixDetailsData = {
2086
2090
  ["MISSING_SSL_MINVERSION" /* MissingSslMinversion */]: void 0,
2087
2091
  ["WEBSOCKET_MISSING_ORIGIN_CHECK" /* WebsocketMissingOriginCheck */]: void 0,
2088
2092
  ["DUPLICATED_STRINGS" /* DuplicatedStrings */]: void 0,
2089
- ["INSECURE_UUID_VERSION" /* InsecureUuidVersion */]: void 0
2093
+ ["INSECURE_UUID_VERSION" /* InsecureUuidVersion */]: void 0,
2094
+ ["GH_ACTIONS_SHELL_INJECTION" /* GhActionsShellInjection */]: void 0
2090
2095
  };
2091
2096
 
2092
2097
  // src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
@@ -7855,14 +7860,26 @@ var GetVulByNodesMetadataZ = z27.object({
7855
7860
  var debug11 = Debug11("mobbdev:gql");
7856
7861
  var API_KEY_HEADER_NAME = "x-mobb-key";
7857
7862
  var REPORT_STATE_CHECK_DELAY = 5 * 1e3;
7858
- var fetchWithProxy = (url, options = {}) => {
7863
+ function getProxyAgent(url) {
7859
7864
  try {
7860
- const parsedUrl = new URL(url.toString());
7865
+ const parsedUrl = new URL(url);
7861
7866
  const isHttp = parsedUrl.protocol === "http:";
7862
7867
  const isHttps = parsedUrl.protocol === "https:";
7863
7868
  const proxy = isHttps ? HTTPS_PROXY : isHttp ? HTTP_PROXY : null;
7864
7869
  if (proxy) {
7865
- const agent = isHttps ? new HttpsProxyAgent2(proxy) : new HttpProxyAgent2(proxy);
7870
+ debug11("Using proxy %s", proxy);
7871
+ debug11("Proxy agent %o", proxy);
7872
+ return isHttps ? new HttpsProxyAgent2(proxy) : new HttpProxyAgent2(proxy);
7873
+ }
7874
+ } catch (err) {
7875
+ debug11(`Skipping proxy for ${url}. Reason: ${err.message}`);
7876
+ }
7877
+ return void 0;
7878
+ }
7879
+ var fetchWithProxy = (url, options = {}) => {
7880
+ try {
7881
+ const agent = getProxyAgent(url.toString());
7882
+ if (agent) {
7866
7883
  return fetchOrig(url, {
7867
7884
  ...options,
7868
7885
  // @ts-expect-error Node-fetch doesn't type 'agent', but it's valid
@@ -8606,9 +8623,11 @@ async function uploadFile({
8606
8623
  debug15("upload file from buffer");
8607
8624
  form.append("file", new File([file], "file"));
8608
8625
  }
8626
+ const agent = getProxyAgent(url);
8609
8627
  const response = await fetch3(url, {
8610
8628
  method: "POST",
8611
- body: form
8629
+ body: form,
8630
+ agent
8612
8631
  });
8613
8632
  if (!response.ok) {
8614
8633
  debug15("error from S3 %s %s", response.body, response.status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.js",