fetch_bugs.sh 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #!/bin/sh
  2. ## Fetches security bugs from Bugzilla.
  3. ## These queries are particular; modifications are made by editing this file,
  4. ## the only arguments are the path to this project's code (to call a helper
  5. ## script), and the path of where the issues should be output.
  6. codeDir="$1"
  7. issuesDir="$2"
  8. fetchScript="$codeDir/fetch_bugzilla_bugs/fetch-bugzilla.py"
  9. toFilter="$issuesDir/to_filter/"
  10. #products='Core,Firefox,Firefox for Android,Firefox for iOS,Firefox OS,Focus,Focus-iOS,NSS,Privacy,Servo'
  11. securityLevels='keywords=sec-critical, sec-high, sec-moderate, sec-low'
  12. mkdir -p "$issuesDir"
  13. mkdir -p "$toFilter"
  14. echo "mp4 parsing (stagefright)"
  15. python3 "$fetchScript" \
  16. --bugzilla bugzilla.mozilla.org \
  17. --key-value "$securityLevels" \
  18. --key-value 'keywords_type=anywords' \
  19. --key-value 'short_desc=stagefright' \
  20. --key-value 'short_desc_type=allwordssubstr' \
  21. --key-value 'chfieldvalue=FIXED' \
  22. --key-value 'chfield=resolution' \
  23. --key-value 'chfieldto=2018-01-09'
  24. rm -rf "$issuesDir/stagefright-issues" && mv issues "$issuesDir/stagefright-issues"
  25. echo "unicode encoder (uconv)"
  26. python3 "$fetchScript" \
  27. --bugzilla bugzilla.mozilla.org \
  28. --key-value "$securityLevels" \
  29. --key-value 'keywords_type=anywords' \
  30. --key-value 'component=Internationalization' \
  31. --key-value 'longdesc=uconv' \
  32. --key-value 'longdesc_type=allwordssubstr' \
  33. --key-value 'chfieldvalue=FIXED' \
  34. --key-value 'chfield=resolution' \
  35. --key-value 'chfieldto=2017-06-13'
  36. rm -rf "$issuesDir/uconv-issues" && mv issues "$issuesDir/uconv-issues"
  37. echo "CSS"
  38. python3 "$fetchScript" \
  39. --bugzilla bugzilla.mozilla.org \
  40. --key-value "$securityLevels" \
  41. --key-value 'keywords_type=anywords' \
  42. --key-value 'component=CSS Parsing and Computation' \
  43. --key-value 'chfieldvalue=FIXED' \
  44. --key-value 'chfield=resolution' \
  45. --key-value 'chfieldto=2017-11-14' \
  46. --key-value 'o1=anywords' --key-value 'n1=1' --key-value 'f1=short_desc' --key-value 'v1=stylo'
  47. rm -rf "$toFilter/css-issues" && mv issues "$toFilter/css-issues"
  48. # component interaction (XPCOM)
  49. ## This doesn't seem valid, so removing until/unless it's clear there's
  50. ## something comparable.
  51. #python3 "$fetchScript" \
  52. # --bugzilla bugzilla.mozilla.org \
  53. # --key-value "$securityLevels" \
  54. # --key-value 'keywords_type=anywords' \
  55. # --key-value 'component=XPCOM'
  56. #rm -rf "$issuesDir/xpcom-issues" && mv issues "$issuesDir/xpcom-issues"
  57. echo "audio (cubeb)"
  58. python3 "$fetchScript" \
  59. --bugzilla bugzilla.mozilla.org \
  60. --key-value "$securityLevels" \
  61. --key-value 'keywords_type=anywords' \
  62. --key-value 'component=Audio/Video: cubeb' \
  63. --key-value 'chfieldvalue=FIXED' \
  64. --key-value 'chfield=resolution' \
  65. --key-value 'chfieldto=2020-01-17'
  66. rm -rf "$toFilter/cubeb-linux-issues" && cp -r issues "$toFilter/cubeb-linux-issues"
  67. rm -rf "$toFilter/cubeb-macos-issues" && mv issues "$toFilter/cubeb-macos-issues"
  68. echo "prefrences parsing"
  69. python3 "$fetchScript" \
  70. --bugzilla bugzilla.mozilla.org \
  71. --key-value "$securityLevels" \
  72. --key-value 'keywords_type=anywords' \
  73. --key-value 'component=Preferences: Backend' \
  74. --key-value 'chfieldvalue=FIXED' \
  75. --key-value 'chfield=resolution' \
  76. --key-value 'chfieldto=2018-02-01'
  77. rm -rf "$toFilter/prefs-parser-issues" && mv issues "$toFilter/prefs-parser-issues"
  78. echo "rendering (layers)"
  79. python3 "$fetchScript" \
  80. --bugzilla bugzilla.mozilla.org \
  81. --key-value "$securityLevels" \
  82. --key-value 'keywords_type=anywords' \
  83. --key-value 'component=Graphics: Layers' \
  84. --key-value 'component=Graphics'
  85. rm -rf "$toFilter/layers-issues" && mv issues "$toFilter/layers-issues"
  86. echo "renering (webrender)"
  87. python3 "$fetchScript" \
  88. --bugzilla bugzilla.mozilla.org \
  89. --key-value "$securityLevels" \
  90. --key-value 'keywords_type=anywords' \
  91. --key-value 'component=Graphics: WebRender'
  92. rm -rf "$issuesDir/webrender-nonrust-issues" && mv issues "$issuesDir/webrender-nonrust-issues"
  93. echo "certificate blocklist"
  94. python3 "$fetchScript" \
  95. --bugzilla bugzilla.mozilla.org \
  96. --key-value "$securityLevels" \
  97. --key-value 'keywords_type=anywords' \
  98. --key-value 'component= Security: PSM'
  99. rm -rf "$toFilter/cert-blocklist-issues" && mv issues "$toFilter/cert-blocklist-issues"
  100. echo "Japanese encoding detector"
  101. echo "Unicode language identifier"
  102. echo "language negotiation"
  103. echo "encoding detector"
  104. python3 "$fetchScript" \
  105. --bugzilla bugzilla.mozilla.org \
  106. --key-value "$securityLevels" \
  107. --key-value 'keywords_type=anywords' \
  108. --key-value 'component=Internationalization' \
  109. --key-value 'chfieldvalue=FIXED' \
  110. --key-value 'chfield=resolution' \
  111. --key-value 'chfieldto=2019-12-12'
  112. rm -rf "$toFilter/japanese-encoding-issues" && cp -r issues "$toFilter/japanese-encoding-issues"
  113. rm -rf "$toFilter/language-identifier-issues" && cp -r issues "$toFilter/language-identifier-issues"
  114. rm -rf "$toFilter/language-negotiation-issues" && cp -r issues "$toFilter/language-negotiation-issues"
  115. rm -rf "$toFilter/encoding-detector-issues" && mv issues "$toFilter/encoding-detector-issues"
  116. echo "hyphenation (libhyphen)"
  117. python3 "$fetchScript" \
  118. --bugzilla bugzilla.mozilla.org \
  119. --key-value "$securityLevels" \
  120. --key-value 'keywords_type=anywords' \
  121. --key-value 'component=Layout: Text and Fonts' \
  122. --key-value 'chfieldvalue=FIXED' \
  123. --key-value 'chfield=resolution' \
  124. --key-value 'chfieldto=2019-11-12'
  125. rm -rf "$toFilter/hyphenation-issues" && mv issues "$toFilter/hyphenation-issues"
  126. echo "color management (qcms)"
  127. python3 "$fetchScript" \
  128. --bugzilla bugzilla.mozilla.org \
  129. --key-value "$securityLevels" \
  130. --key-value 'keywords_type=anywords' \
  131. --key-value 'component=Graphics: Color Management' \
  132. --key-value 'chfieldvalue=FIXED' \
  133. --key-value 'chfield=resolution' \
  134. --key-value 'chfieldto=2020-09-21'
  135. rm -rf "$issuesDir/qcms-issues" && mv issues "$issuesDir/qcms-issues"