1# Copyright 2024 The Chromium Project. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# The set of path prefixes that should be checked for unsafe pointer usage (see 6# -Wunsafe-buffer-usage in Clang). 7# 8# *** 9# Paths should be written as relative to the root of the source tree with 10# unix-style path separators. Directory prefixes should end with `/`, such 11# as `base/`. 12# *** 13# 14# Lines that begin with `-` name path prefixes that will *not* be checked for 15# unsafe-buffer-usage. They are known to do unsafe things and should be 16# changed to use constructs like base::span or containers like base::HeapArray 17# and std::vector instead. See https://crbug.com/40285824 18# 19# Lines that begin with `+` name path prefixes that have no unsafe-buffer-usage 20# (or all such usage is annotated), and are protected against new unsafe pointer 21# behaviour by the compiler. 22# 23# By default, all files are checked for unsafe-buffer-usage unless they are 24# match a `-` path prefix line here. If a file matches both a `-` and `+` line, 25# the `+` line takes precedence and the file will be checked. 26# 27# To opt individual files out of checks, place `#pragma allow_unsafe_buffers` 28# anywhere in the (source or header) file, guarded by 29# `#ifdef UNSAFE_BUFFERS_BUILD`. These pragmas represent the technical debt and 30# security risk present in the file through unsafe pointer usage. 31# 32# *** 33# Recommended process for removing a `-dir/` line from this file: 34# 35# 1. Remove the `-dir/` line from this paths file. 36# a. Possibly add some subdirectories if needed to reduce scope, 37# like `-dir/sub_dir/`. 38# 2. Add `#pragma allow_unsafe_buffers` to every file in the directory that now 39# has a compilation error, with a TODO to the tracking bug for the 40# directory: 41# ``` 42# #ifdef UNSAFE_BUFFERS_BUILD 43# // TODO(crbug.com/ABC): Remove this and convert code to safer constructs. 44# #pragma allow_unsafe_buffers 45# #endif 46# ``` 47# 3. Work through the files in the directory, converting pointers to spans, or 48# to owning containers like HeapArray and vector. Remove the pragmas from 49# the files when there is no unsafe pointer usage left in each one. 50# 51# See `docs/unsafe_buffers.md`. 52 53-android_webview/ 54-base/allocator 55-base/third_party 56-chrome/browser/ash/chromebox_for_meetings/ 57-chrome/browser/ash/policy/ 58-chrome/browser/component_updater/ 59-chrome/browser/extensions/api/messaging/ 60-chrome/browser/extensions/api/printing/ 61-chrome/browser/local_discovery/ 62-chrome/browser/media/webrtc 63-chrome/browser/platform_experience/win/ 64-chrome/browser/thumbnail/ 65-chrome/browser/ui/android/hats/ 66-chrome/browser/ui/webui/lens/ 67-chrome/browser/ui/webui/media_router/ 68-chrome/chrome_elf/third_party_dlls/ 69-chrome/common/profiler/ 70-chrome/credential_provider/ 71-chrome/elevation_service/ 72-chrome/services/cups_proxy/ 73-chrome/services/ipp_parser/public/cpp/ 74-chrome/services/sharing/nearby/decoder/ 75-chrome/test/ 76-chrome/tools/service_discovery_sniffer/ 77-chrome/updater/net/ 78-chromecast/ 79-chromeos/ash/components/memory/userspace_swap/ 80-chromeos/ash/components/system/ 81-chromeos/ash/services/libassistant/ 82-chromeos/components/kcer/kcer_nss 83-clank/ 84-components/allocation_recorder/ 85-components/chromeos_camera 86-components/commerce/ 87-components/crash/ 88-components/cronet/ 89-components/crx_file/ 90-components/desks_storage/ 91-components/device_event_log/ 92-components/exo/ 93-components/grpc_support/ 94-components/gwp_asan/ 95-components/media_router/ 96-components/open_from_clipboard/ 97-components/optimization_guide/internal/ 98-components/ownership/ 99-components/query_parser/ 100-components/segmentation_platform/ 101-components/sharing_message/ 102-components/system_cpu/ 103-components/url_formatter/ 104-components/url_pattern_index/ 105-components/webrtc_logging/ 106-components/zucchini/ 107-fuchsia_web/ 108-gpu/ipc/service/ 109-ios/ 110-ios_internal/ 111-native_client/ 112-net/third_party/ 113-printing/ 114-remoting/host/ 115-remoting/client/input/ 116-testing/iossim/ 117-third_party/ 118+third_party/blink/ 119-tools/ 120-url/third_party 121-v8/ 122 123# Before clearing this directory, make sure to run against a bot running 124# with the build flag: use_internal_isolated_origins. There are none on the CQ 125# by default. See file components/site_isolation/preloaded_isolated_origins.cc 126-components/site_isolation/ 127 128# TODO(crbug.com/41497066#comment22) The Win SDK headers don't get categorized 129# as system headers when building with DEPOT_TOOLS_WIN_TOOLCHAIN=0 ? 130-Program Files (x86)/Windows Kits/ 131 132# Please be cautious before removing this opt-out, because it won't show up on 133# the Mega-CQ, nor Sheriffs' dashboards. See https://crbug.com/361760067 134# Removing this directory may fail on the bot CI bot: 135# https://luci-milo.appspot.com/ui/p/chrome/builders/official/win-arm64-clang 136-chrome/installer/ 137 138# Please check 'linux-v4l2-codec-rel' bot before removing this opt-out. 139-media/gpu/v4l2/ 140 141# //codelabs is a directory that contains examples for developers to modify as 142# they learn about chromium development. This is indefinitely opt-out because 143# it is not part of the main build, and we don't want developers to be blocked 144# by this check. 145-codelabs/ 146