mobbdev 1.0.155 → 1.0.157

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 +177 -120
  2. package/package.json +1 -2
package/dist/index.mjs CHANGED
@@ -369,75 +369,18 @@ var init_ExcludedDirs = __esm({
369
369
  }
370
370
  });
371
371
 
372
- // src/features/analysis/scm/services/ExcludedFilePatterns.ts
373
- var EXCLUDED_FILE_PATTERNS;
374
- var init_ExcludedFilePatterns = __esm({
375
- "src/features/analysis/scm/services/ExcludedFilePatterns.ts"() {
372
+ // src/features/analysis/scm/services/FilePatterns.ts
373
+ var EXCLUDED_FILE_PATTERNS, SUPPORTED_EXTENSIONS, IMPORTANT_PROJECT_FILES;
374
+ var init_FilePatterns = __esm({
375
+ "src/features/analysis/scm/services/FilePatterns.ts"() {
376
376
  "use strict";
377
377
  EXCLUDED_FILE_PATTERNS = [
378
- ".json",
379
- ".snap",
380
- ".env.vault",
381
- ".env",
382
- ".yaml",
383
- ".yml",
384
- ".toml",
385
- ".ini",
386
- ".conf",
387
- ".config",
388
- ".xml",
389
- ".env",
390
- ".md",
391
- ".txt",
392
- ".rst",
393
- ".adoc",
394
- ".lock",
395
- ".png",
396
- ".jpg",
397
- ".jpeg",
398
- ".gif",
399
- ".svg",
400
- ".ico",
401
- ".webp",
402
- ".bmp",
403
- ".tiff",
404
- ".ttf",
405
- ".otf",
406
- ".woff",
407
- ".woff2",
408
- ".eot",
409
- ".zip",
410
- ".tar",
411
- ".gz",
412
- ".rar",
413
- ".7z",
414
- ".log",
415
- ".db",
416
- ".sqlite",
417
- ".sql",
418
- ".pem",
419
- ".crt",
420
- ".key",
421
- ".p12",
422
- ".pfx",
423
- ".editorconfig",
424
- ".sublime-project",
425
- ".sublime-workspace",
426
- ".DS_Store",
427
- "Thumbs.db",
428
- ".lcov",
429
- ".exe",
430
- ".dll",
431
- ".so",
432
- ".dylib",
433
- ".class",
434
- ".pyc",
435
- ".pyo",
436
- ".o",
437
- ".obj",
378
+ // Minified and bundled files (have supported extensions but should be excluded)
438
379
  ".min.js",
439
- ".min.css",
440
380
  ".min.html",
381
+ ".bundle.js",
382
+ ".chunk.js",
383
+ // Test files (have supported extensions but should be excluded)
441
384
  ".test.js",
442
385
  ".test.ts",
443
386
  ".test.jsx",
@@ -446,30 +389,17 @@ var init_ExcludedFilePatterns = __esm({
446
389
  ".spec.ts",
447
390
  ".spec.jsx",
448
391
  ".spec.tsx",
392
+ // TypeScript declaration files
449
393
  ".d.ts",
450
- ".bundle.js",
451
- ".chunk.js",
452
- "dockerfile",
453
- "jenkinsfile",
454
- "go.sum",
455
- ".gitignore",
456
- ".gitattributes",
457
- ".gitmodules",
458
- ".gitkeep",
459
- ".keep",
460
- ".hgignore",
461
- ".nvmrc",
462
- ".node-version",
463
- ".npmrc",
464
- ".yarnrc",
394
+ // Runtime version files that have supported extensions
465
395
  ".pnpmfile.cjs",
466
- ".ruby-version",
467
- ".python-version",
468
- ".rvmrc",
469
- ".rbenv-version",
470
- ".gvmrc",
471
- "makefile",
472
- "rakefile",
396
+ // Language-specific files with supported extensions that should be excluded
397
+ "go.sum",
398
+ "project.clj",
399
+ "setup.py",
400
+ "setup.cfg",
401
+ "manifest.in",
402
+ // Build tool configuration files (have supported extensions but should be excluded)
473
403
  "gulpfile.js",
474
404
  "gruntfile.js",
475
405
  "webpack.config.js",
@@ -481,41 +411,154 @@ var init_ExcludedFilePatterns = __esm({
481
411
  "nuxt.config.js",
482
412
  "tailwind.config.js",
483
413
  "postcss.config.js",
484
- ".babelrc",
414
+ // Linter and formatter config files (with supported extensions)
485
415
  ".babelrc.js",
486
- ".swcrc",
487
- ".browserslistrc",
416
+ ".eslintrc.js",
417
+ ".prettierrc.js",
418
+ ".stylelintrc.js",
419
+ // Test framework config files (with supported extensions)
488
420
  "jest.config.js",
489
421
  "jest.config.ts",
490
422
  "vitest.config.js",
491
423
  "karma.conf.js",
492
424
  "protractor.conf.js",
493
425
  "cypress.config.js",
494
- "playwright.config.js",
495
- ".nycrc",
496
- ".c8rc",
497
- ".eslintrc",
498
- ".eslintrc.js",
499
- ".prettierrc",
500
- ".prettierrc.js",
501
- ".stylelintrc",
502
- ".stylelintrc.js",
503
- "pipfile",
504
- "gemfile",
505
- "go.mod",
506
- "project.clj",
507
- "setup.py",
508
- "setup.cfg",
509
- "manifest.in",
510
- ".pythonrc",
511
- "readme",
512
- "changelog",
513
- "authors",
514
- "contributors",
515
- "license",
516
- "notice",
517
- "copyright",
518
- ".htaccess"
426
+ "playwright.config.js"
427
+ ];
428
+ SUPPORTED_EXTENSIONS = [
429
+ // Apex
430
+ ".cls",
431
+ // Bash
432
+ ".bash",
433
+ ".sh",
434
+ // C
435
+ ".c",
436
+ ".h",
437
+ // Cairo
438
+ ".cairo",
439
+ // Circom
440
+ ".circom",
441
+ // Clojure
442
+ ".clj",
443
+ ".cljs",
444
+ ".cljc",
445
+ ".edn",
446
+ // C++
447
+ ".cc",
448
+ ".cpp",
449
+ ".cxx",
450
+ ".c++",
451
+ ".pcc",
452
+ ".tpp",
453
+ ".C",
454
+ ".hh",
455
+ ".hpp",
456
+ ".hxx",
457
+ ".inl",
458
+ ".ipp",
459
+ // C#
460
+ ".cs",
461
+ // Dart
462
+ ".dart",
463
+ // Dockerfile
464
+ ".dockerfile",
465
+ ".Dockerfile",
466
+ "Dockerfile",
467
+ "dockerfile",
468
+ // Elixir
469
+ ".ex",
470
+ ".exs",
471
+ // Go
472
+ ".go",
473
+ // Hack
474
+ ".hack",
475
+ ".hck",
476
+ ".hh",
477
+ // HTML
478
+ ".htm",
479
+ ".html",
480
+ // Java
481
+ ".java",
482
+ // JavaScript
483
+ ".cjs",
484
+ ".js",
485
+ ".jsx",
486
+ ".mjs",
487
+ // JSON
488
+ ".json",
489
+ ".ipynb",
490
+ // Jsonnet
491
+ ".jsonnet",
492
+ ".libsonnet",
493
+ // Julia
494
+ ".jl",
495
+ // Kotlin
496
+ ".kt",
497
+ ".kts",
498
+ ".ktm",
499
+ // Lisp
500
+ ".lisp",
501
+ ".cl",
502
+ ".el",
503
+ // Lua
504
+ ".lua",
505
+ // Move (both Sui and Aptos)
506
+ ".move",
507
+ // OCaml
508
+ ".ml",
509
+ ".mli",
510
+ // PHP
511
+ ".php",
512
+ ".tpl",
513
+ ".phtml",
514
+ // PromQL
515
+ ".promql",
516
+ // Protocol Buffers
517
+ ".proto",
518
+ // Python
519
+ ".py",
520
+ ".pyi",
521
+ // QL
522
+ ".ql",
523
+ ".qll",
524
+ // R
525
+ ".r",
526
+ ".R",
527
+ // Ruby
528
+ ".rb",
529
+ // Rust
530
+ ".rs",
531
+ // Scala
532
+ ".scala",
533
+ // Scheme
534
+ ".scm",
535
+ ".ss",
536
+ // Solidity
537
+ ".sol",
538
+ // Swift
539
+ ".swift",
540
+ // Terraform
541
+ ".tf",
542
+ ".hcl",
543
+ ".tfvars",
544
+ // TypeScript
545
+ ".ts",
546
+ ".tsx",
547
+ // Vue
548
+ ".vue",
549
+ // XML
550
+ ".xml",
551
+ ".plist",
552
+ // YAML
553
+ ".yml",
554
+ ".yaml"
555
+ ];
556
+ IMPORTANT_PROJECT_FILES = [
557
+ "package.json",
558
+ "package-lock.json",
559
+ "pnpm-lock.yaml",
560
+ "yarn.lock",
561
+ "pom.xml"
519
562
  ];
520
563
  }
521
564
  });
@@ -531,11 +574,17 @@ var init_FileUtils = __esm({
531
574
  "use strict";
532
575
  init_configs();
533
576
  init_ExcludedDirs();
534
- init_ExcludedFilePatterns();
577
+ init_FilePatterns();
535
578
  FileUtils = class {
579
+ // Important project configuration files that should always be included
536
580
  static isExcludedFileType(filepath) {
537
581
  const basename = path.basename(filepath).toLowerCase();
538
- if (basename === ".env" || basename.startsWith(".env.")) {
582
+ if (IMPORTANT_PROJECT_FILES.includes(basename)) {
583
+ return false;
584
+ }
585
+ const ext = path.extname(filepath).toLowerCase();
586
+ const isSupported = SUPPORTED_EXTENSIONS.includes(ext) || SUPPORTED_EXTENSIONS.includes(basename);
587
+ if (!isSupported) {
539
588
  return true;
540
589
  }
541
590
  if (EXCLUDED_FILE_PATTERNS.some((pattern) => basename.endsWith(pattern))) {
@@ -1555,6 +1604,7 @@ var IssueType_Enum = /* @__PURE__ */ ((IssueType_Enum2) => {
1555
1604
  IssueType_Enum2["IncompleteSanitization"] = "INCOMPLETE_SANITIZATION";
1556
1605
  IssueType_Enum2["IncompleteUrlSanitization"] = "INCOMPLETE_URL_SANITIZATION";
1557
1606
  IssueType_Enum2["IncompleteUrlSchemeCheck"] = "INCOMPLETE_URL_SCHEME_CHECK";
1607
+ IssueType_Enum2["IncorrectSqlApiUsage"] = "INCORRECT_SQL_API_USAGE";
1558
1608
  IssueType_Enum2["InformationExposureViaHeaders"] = "INFORMATION_EXPOSURE_VIA_HEADERS";
1559
1609
  IssueType_Enum2["InsecureBinderConfiguration"] = "INSECURE_BINDER_CONFIGURATION";
1560
1610
  IssueType_Enum2["InsecureCookie"] = "INSECURE_COOKIE";
@@ -1623,6 +1673,8 @@ var IssueType_Enum = /* @__PURE__ */ ((IssueType_Enum2) => {
1623
1673
  IssueType_Enum2["UselessTernary"] = "USELESS_TERNARY";
1624
1674
  IssueType_Enum2["UseOfHardCodedCryptographicKey"] = "USE_OF_HARD_CODED_CRYPTOGRAPHIC_KEY";
1625
1675
  IssueType_Enum2["UseOfSystemOutputStream"] = "USE_OF_SYSTEM_OUTPUT_STREAM";
1676
+ IssueType_Enum2["UseRaiseForStatus"] = "USE_RAISE_FOR_STATUS";
1677
+ IssueType_Enum2["UseSysExit"] = "USE_SYS_EXIT";
1626
1678
  IssueType_Enum2["ValueNeverRead"] = "VALUE_NEVER_READ";
1627
1679
  IssueType_Enum2["ValueShadowing"] = "VALUE_SHADOWING";
1628
1680
  IssueType_Enum2["WcfMisconfigurationInsufficientLogging"] = "WCF_MISCONFIGURATION_INSUFFICIENT_LOGGING";
@@ -2666,7 +2718,10 @@ var fixDetailsData = {
2666
2718
  ["WRITABLE_FILESYSTEM_SERVICE" /* WritableFilesystemService */]: void 0,
2667
2719
  ["NO_NEW_PRIVILEGES" /* NoNewPrivileges */]: void 0,
2668
2720
  ["USELESS_TERNARY" /* UselessTernary */]: void 0,
2669
- ["REQUEST_PARAMETERS_BOUND_VIA_INPUT" /* RequestParametersBoundViaInput */]: void 0
2721
+ ["REQUEST_PARAMETERS_BOUND_VIA_INPUT" /* RequestParametersBoundViaInput */]: void 0,
2722
+ ["USE_SYS_EXIT" /* UseSysExit */]: void 0,
2723
+ ["INCORRECT_SQL_API_USAGE" /* IncorrectSqlApiUsage */]: void 0,
2724
+ ["USE_RAISE_FOR_STATUS" /* UseRaiseForStatus */]: void 0
2670
2725
  };
2671
2726
 
2672
2727
  // src/features/analysis/scm/shared/src/getIssueType.ts
@@ -2793,7 +2848,10 @@ var issueTypeMap = {
2793
2848
  ["WRITABLE_FILESYSTEM_SERVICE" /* WritableFilesystemService */]: "Writable Filesystem Service",
2794
2849
  ["NO_NEW_PRIVILEGES" /* NoNewPrivileges */]: "No New Privileges",
2795
2850
  ["USELESS_TERNARY" /* UselessTernary */]: "Useless Ternary",
2796
- ["REQUEST_PARAMETERS_BOUND_VIA_INPUT" /* RequestParametersBoundViaInput */]: "Request Parameters Bound Via Input"
2851
+ ["REQUEST_PARAMETERS_BOUND_VIA_INPUT" /* RequestParametersBoundViaInput */]: "Request Parameters Bound Via Input",
2852
+ ["USE_SYS_EXIT" /* UseSysExit */]: "Use Sys Exit",
2853
+ ["INCORRECT_SQL_API_USAGE" /* IncorrectSqlApiUsage */]: "Incorrect SQL API Usage",
2854
+ ["USE_RAISE_FOR_STATUS" /* UseRaiseForStatus */]: "Use Raise For Status"
2797
2855
  };
2798
2856
  var issueTypeZ = z.nativeEnum(IssueType_Enum);
2799
2857
  var getIssueTypeFriendlyString = (issueType) => {
@@ -5229,7 +5287,6 @@ var ProjectVulnerabilityReport = z11.object({
5229
5287
  createdOn: z11.string(),
5230
5288
  issueTypes: z11.record(z11.string(), z11.number()).nullable(),
5231
5289
  issueLanguages: z11.record(z11.nativeEnum(IssueLanguage_Enum), z11.number()).nullable(),
5232
- fixesCountByEffort: z11.record(z11.nativeEnum(Effort_To_Apply_Fix_Enum), z11.number()).nullable(),
5233
5290
  repo: z11.object({
5234
5291
  originalUrl: z11.string(),
5235
5292
  reference: z11.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.155",
3
+ "version": "1.0.157",
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",
@@ -30,7 +30,6 @@
30
30
  "test:watch": "TOKEN=$(../../scripts/login_auth0.sh) vitest",
31
31
  "test:integration:proxy": "GIT_PROXY_HOST=http://tinyproxy:8888 HTTP_PROXY=http://localhost:8888 API_URL=http://app-api:8080/v1/graphql TOKEN=$(../../scripts/login_auth0.sh) vitest run --sequence.concurrent=false false integration.test.ts",
32
32
  "lint": "eslint --cache --max-warnings 0 --ignore-path .eslintignore --ext .ts,.tsx,.jsx,.graphql .",
33
- "lint:fix": "eslint --fix --cache --max-warnings 0 --ignore-path .eslintignore --ext .js,.ts,.tsx,.jsx,.graphql . && prettier --write \"src/**/*.graphql\"",
34
33
  "lint:fix:files": "eslint --fix --cache --max-warnings 0 --ignore-path .eslintignore --ext .js,.ts,.tsx,.jsx,.graphql",
35
34
  "prepack": "dotenv-vault pull production .env && pnpm build",
36
35
  "dev:mcp": "pnpm run build && node dist/index.mjs mcp",