Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is largely just
taking the clang-recommended fixes and checking them in. Subsequent
patches will fix the more unique issues.
Note, that a number of new ignores are added into the .clang-tidy file.
These can be cleaned up over time as they're understood. The majority
are places where boost includes a impl/x.hpp and x.hpp, but expects you
to use the later. include-cleaner opts for the impl, but it isn't clear
why.
Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp
index a43cf22..1a6f1b7 100644
--- a/include/async_resolve.hpp
+++ b/include/async_resolve.hpp
@@ -4,13 +4,22 @@
#include "dbus_singleton.hpp"
#include "logging.hpp"
+#include <sys/socket.h>
+
+#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/address.hpp>
-#include <boost/asio/ip/basic_endpoint.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio/ip/address_v6.hpp>
#include <boost/asio/ip/tcp.hpp>
-#include <sdbusplus/message.hpp>
+#include <boost/system/errc.hpp>
#include <charconv>
-#include <memory>
+#include <cstdint>
+#include <string>
+#include <string_view>
+#include <system_error>
+#include <tuple>
+#include <vector>
namespace async_resolve
{
diff --git a/include/async_resp.hpp b/include/async_resp.hpp
index a767af7..6d18ffc 100644
--- a/include/async_resp.hpp
+++ b/include/async_resp.hpp
@@ -4,7 +4,7 @@
#include "http_response.hpp"
-#include <functional>
+#include <utility>
namespace bmcweb
{
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 9bb0351..3021af5 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -2,17 +2,31 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include "cookies.hpp"
-#include "forward_unauthorized.hpp"
-#include "http_request.hpp"
+#include "bmcweb_config.h"
+
#include "http_response.hpp"
-#include "http_utility.hpp"
+#include "logging.hpp"
+#include "ossl_random.hpp"
#include "pam_authenticate.hpp"
+#include "sessions.hpp"
+#include "utility.hpp"
+#include "utils/ip_utils.hpp"
#include "webroutes.hpp"
+#include <security/_pam_types.h>
+
+#include <boost/asio/ip/address.hpp>
+#include <boost/beast/http/field.hpp>
+#include <boost/beast/http/message.hpp>
+#include <boost/beast/http/verb.hpp>
#include <boost/container/flat_set.hpp>
-#include <random>
+#include <cstddef>
+#include <cstring>
+#include <memory>
+#include <optional>
+#include <string>
+#include <string_view>
#include <utility>
namespace crow
diff --git a/include/boost_formatters.hpp b/include/boost_formatters.hpp
index 8563698..bf8397f 100644
--- a/include/boost_formatters.hpp
+++ b/include/boost_formatters.hpp
@@ -3,10 +3,12 @@
#pragma once
#include <boost/system/error_code.hpp>
-#include <boost/url/grammar.hpp>
+#include <boost/url/grammar/string_view_base.hpp>
#include <boost/url/url_view_base.hpp>
+#include <concepts>
#include <format>
+#include <string_view>
// NOLINTBEGIN(readability-convert-member-functions-to-static, cert-dcl58-cpp)
template <std::derived_from<boost::system::error_code> ErrorCodeType>
diff --git a/include/cookies.hpp b/include/cookies.hpp
index 439dbfb..ef76cd6 100644
--- a/include/cookies.hpp
+++ b/include/cookies.hpp
@@ -5,6 +5,8 @@
#include "http_response.hpp"
#include "sessions.hpp"
+#include <boost/beast/http/field.hpp>
+
namespace bmcweb
{
diff --git a/include/credential_pipe.hpp b/include/credential_pipe.hpp
index 5e9153e..ec159e6 100644
--- a/include/credential_pipe.hpp
+++ b/include/credential_pipe.hpp
@@ -12,7 +12,9 @@
#include <boost/asio/write.hpp>
#include <array>
+#include <cstring>
#include <string>
+#include <utility>
// Wrapper for boost::async_pipe ensuring proper pipe cleanup
class CredentialsPipe
@@ -21,6 +23,9 @@
explicit CredentialsPipe(boost::asio::io_context& io) : impl(io), read(io)
{
boost::system::error_code ec;
+
+ // Unclear why tidy complains here.
+ // NOLINTNEXTLINE(misc-include-cleaner)
boost::asio::connect_pipe(read, impl, ec);
if (ec)
{
@@ -35,6 +40,7 @@
~CredentialsPipe()
{
+ // NOLINTNEXTLINE(misc-include-cleaner)
explicit_bzero(user.data(), user.capacity());
explicit_bzero(pass.data(), pass.capacity());
}
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index f468cc4..050bd34 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -2,17 +2,26 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include "app.hpp"
-#include "async_resp.hpp"
#include "dbus_singleton.hpp"
+#include "logging.hpp"
#include "openbmc_dbus_rest.hpp"
#include "websocket.hpp"
+#include <systemd/sd-bus.h>
+
#include <boost/container/flat_map.hpp>
#include <boost/container/flat_set.hpp>
+#include <nlohmann/json.hpp>
#include <sdbusplus/bus/match.hpp>
-#include <sdbusplus/message/types.hpp>
+#include <sdbusplus/message.hpp>
-#include <variant>
+#include <cstddef>
+#include <cstring>
+#include <functional>
+#include <memory>
+#include <regex>
+#include <string>
+#include <vector>
namespace crow
{
diff --git a/include/dbus_privileges.hpp b/include/dbus_privileges.hpp
index ed08797..f174991 100644
--- a/include/dbus_privileges.hpp
+++ b/include/dbus_privileges.hpp
@@ -2,18 +2,24 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include "async_resp.hpp"
+#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
#include "error_messages.hpp"
#include "http_request.hpp"
#include "http_response.hpp"
#include "logging.hpp"
+#include "privileges.hpp"
#include "routing/baserule.hpp"
+#include "sessions.hpp"
#include "utils/dbus_utils.hpp"
+#include <boost/beast/http/status.hpp>
#include <boost/url/format.hpp>
#include <sdbusplus/unpack_properties.hpp>
#include <memory>
+#include <optional>
#include <string>
#include <utility>
#include <vector>
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index 3a6cfc7..5c33b28 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -8,6 +8,7 @@
#include "logging.hpp"
#include <boost/system/error_code.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/property.hpp>
#include <sdbusplus/message/native_types.hpp>
@@ -18,7 +19,6 @@
#include <functional>
#include <regex>
#include <span>
-#include <sstream>
#include <string>
#include <string_view>
#include <tuple>
diff --git a/include/duplicatable_file_handle.hpp b/include/duplicatable_file_handle.hpp
index 9532312..b8f9114 100644
--- a/include/duplicatable_file_handle.hpp
+++ b/include/duplicatable_file_handle.hpp
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
+#include <unistd.h>
+
#include <boost/beast/core/file_posix.hpp>
struct DuplicatableFileHandle
diff --git a/include/event_service_store.hpp b/include/event_service_store.hpp
index 9dbb91f..6cc305f 100644
--- a/include/event_service_store.hpp
+++ b/include/event_service_store.hpp
@@ -5,13 +5,17 @@
#include <boost/beast/http/fields.hpp>
#include <boost/container/flat_map.hpp>
+#include <boost/system/result.hpp>
#include <boost/url/parse.hpp>
#include <boost/url/url.hpp>
#include <nlohmann/json.hpp>
+#include <cstdint>
#include <limits>
#include <memory>
+#include <optional>
#include <string>
+#include <utility>
#include <vector>
namespace persistent_data
diff --git a/include/file_test_utilities.hpp b/include/file_test_utilities.hpp
index 73d1359..1d55509 100644
--- a/include/file_test_utilities.hpp
+++ b/include/file_test_utilities.hpp
@@ -1,6 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include <unistd.h>
+
+#include <cstdlib>
#include <filesystem>
#include <string>
#include <string_view>
@@ -20,6 +23,7 @@
{
stringPath = path.string();
+ // NOLINTNEXTLINE(misc-include-cleaner)
int fd = mkstemp(stringPath.data());
EXPECT_GT(fd, 0);
EXPECT_EQ(write(fd, sampleData.data(), sampleData.size()),
diff --git a/include/forward_unauthorized.hpp b/include/forward_unauthorized.hpp
index 07fb2b5..8914602 100644
--- a/include/forward_unauthorized.hpp
+++ b/include/forward_unauthorized.hpp
@@ -1,13 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include "http_request.hpp"
#include "http_response.hpp"
#include "http_utility.hpp"
+#include "sessions.hpp"
+#include <boost/beast/http/field.hpp>
+#include <boost/beast/http/status.hpp>
#include <boost/url/format.hpp>
#include <boost/url/url.hpp>
+#include <string_view>
+
namespace forward_unauthorized
{
diff --git a/include/google/google_service_root.hpp b/include/google/google_service_root.hpp
index d17ee28..6169899 100644
--- a/include/google/google_service_root.hpp
+++ b/include/google/google_service_root.hpp
@@ -4,18 +4,28 @@
#include "app.hpp"
#include "async_resp.hpp"
+#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
#include "error_messages.hpp"
+#include "http_request.hpp"
+#include "logging.hpp"
#include "utils/collection.hpp"
#include "utils/hex_utils.hpp"
#include "utils/json_utils.hpp"
+#include <boost/beast/http/verb.hpp>
#include <boost/system/error_code.hpp>
#include <boost/url/format.hpp>
+#include <boost/url/url.hpp>
#include <nlohmann/json.hpp>
+#include <sdbusplus/message/native_types.hpp>
#include <array>
+#include <cstdint>
+#include <functional>
+#include <memory>
#include <string_view>
+#include <utility>
#include <vector>
namespace crow
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index cf017f5..839faab 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -7,8 +7,24 @@
#include "logging.hpp"
#include "ssl_key_handler.hpp"
+#include <openssl/asn1.h>
+#include <openssl/crypto.h>
+#include <openssl/evp.h>
+#include <openssl/obj_mac.h>
+#include <openssl/x509.h>
+#include <systemd/sd-bus.h>
+
#include <sdbusplus/bus/match.hpp>
-#include <sdbusplus/message/types.hpp>
+#include <sdbusplus/message.hpp>
+
+#include <array>
+#include <cstddef>
+#include <filesystem>
+#include <iterator>
+#include <memory>
+#include <string_view>
+#include <system_error>
+#include <variant>
namespace crow
{
diff --git a/include/http_utility.hpp b/include/http_utility.hpp
index 6a5463d..ffe5378 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -2,15 +2,25 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include <boost/spirit/home/x3.hpp>
+#include <boost/spirit/home/x3/char/char.hpp>
+#include <boost/spirit/home/x3/char/char_class.hpp>
+#include <boost/spirit/home/x3/core/parse.hpp>
+#include <boost/spirit/home/x3/directive/no_case.hpp>
+#include <boost/spirit/home/x3/directive/omit.hpp>
+#include <boost/spirit/home/x3/numeric/uint.hpp>
+#include <boost/spirit/home/x3/operator/alternative.hpp>
+#include <boost/spirit/home/x3/operator/kleene.hpp>
+#include <boost/spirit/home/x3/operator/optional.hpp>
+#include <boost/spirit/home/x3/operator/plus.hpp>
+#include <boost/spirit/home/x3/operator/sequence.hpp>
+#include <boost/spirit/home/x3/string/literal_string.hpp>
+#include <boost/spirit/home/x3/string/symbols.hpp>
#include <algorithm>
+#include <array>
#include <cctype>
-#include <iomanip>
-#include <ostream>
#include <ranges>
#include <span>
-#include <string>
#include <string_view>
#include <vector>
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index 9d5f917..65435d9 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -4,19 +4,28 @@
#include "app.hpp"
#include "async_resp.hpp"
-#include "error_messages.hpp"
-#include "event_service_manager.hpp"
+#include "http_request.hpp"
#include "ibm/utils.hpp"
-#include "resource_messages.hpp"
+#include "logging.hpp"
#include "str_utility.hpp"
#include "utils/json_utils.hpp"
-#include <boost/container/flat_set.hpp>
+#include <boost/beast/core/string_type.hpp>
+#include <boost/beast/http/field.hpp>
+#include <boost/beast/http/status.hpp>
+#include <boost/beast/http/verb.hpp>
#include <nlohmann/json.hpp>
-#include <sdbusplus/message/types.hpp>
+#include <cstddef>
+#include <cstdint>
#include <filesystem>
#include <fstream>
+#include <iterator>
+#include <memory>
+#include <string>
+#include <system_error>
+#include <utility>
+#include <vector>
namespace crow
{
diff --git a/include/ibm/utils.hpp b/include/ibm/utils.hpp
index 43be7f6..fe99f8e 100644
--- a/include/ibm/utils.hpp
+++ b/include/ibm/utils.hpp
@@ -5,7 +5,8 @@
#include "logging.hpp"
#include <filesystem>
-#include <fstream>
+#include <string_view>
+#include <system_error>
namespace crow
{
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index 4644300..128b384 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -3,16 +3,29 @@
#pragma once
#include "app.hpp"
+#include "async_resp.hpp"
#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
+#include "http_request.hpp"
+#include "logging.hpp"
#include "ossl_random.hpp"
+#include <boost/asio/error.hpp>
+#include <boost/asio/steady_timer.hpp>
+#include <boost/beast/http/status.hpp>
+#include <boost/beast/http/verb.hpp>
#include <sdbusplus/bus/match.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/message/native_types.hpp>
+#include <algorithm>
+#include <chrono>
#include <cstdio>
#include <fstream>
+#include <functional>
#include <memory>
#include <ranges>
+#include <string>
namespace crow
{
diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp
index a8866e7..3e0e09e 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -2,13 +2,22 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include "app.hpp"
-#include "async_resp.hpp"
+#include "logging.hpp"
#include "websocket.hpp"
-#include <sys/socket.h>
+#include <sys/types.h>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/ip/address.hpp>
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/beast/core/flat_static_buffer.hpp>
#include <boost/container/flat_map.hpp>
+#include <cstddef>
+#include <memory>
+#include <string>
+
namespace crow
{
namespace obmc_kvm
diff --git a/include/login_routes.hpp b/include/login_routes.hpp
index f322a4c..864ca00 100644
--- a/include/login_routes.hpp
+++ b/include/login_routes.hpp
@@ -3,16 +3,26 @@
#pragma once
#include "app.hpp"
+#include "async_resp.hpp"
#include "cookies.hpp"
#include "http_request.hpp"
#include "http_response.hpp"
+#include "logging.hpp"
#include "multipart_parser.hpp"
#include "pam_authenticate.hpp"
-#include "webassets.hpp"
+#include "sessions.hpp"
-#include <boost/container/flat_set.hpp>
+#include <security/_pam_types.h>
-#include <random>
+#include <boost/beast/http/fields.hpp>
+#include <boost/beast/http/status.hpp>
+#include <boost/beast/http/verb.hpp>
+#include <nlohmann/json.hpp>
+
+#include <memory>
+#include <optional>
+#include <string>
+#include <string_view>
namespace crow
{
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp
index 19d09f4..4dc7973 100644
--- a/include/multipart_parser.hpp
+++ b/include/multipart_parser.hpp
@@ -6,9 +6,13 @@
#include <boost/beast/http/fields.hpp>
+#include <algorithm>
+#include <array>
+#include <cstddef>
#include <ranges>
#include <string>
#include <string_view>
+#include <vector>
enum class ParserError
{
diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp
index ee45f3d..e9c2b15 100644
--- a/include/obmc_console.hpp
+++ b/include/obmc_console.hpp
@@ -2,19 +2,31 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include "app.hpp"
-#include "async_resp.hpp"
+#include "dbus_singleton.hpp"
+#include "dbus_utility.hpp"
+#include "logging.hpp"
#include "websocket.hpp"
-#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/io_context.hpp>
#include <boost/asio/local/stream_protocol.hpp>
+#include <boost/beast/core/error.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/system/error_code.hpp>
+#include <sdbusplus/message/native_types.hpp>
#include <array>
+#include <cstddef>
+#include <functional>
#include <memory>
#include <string>
#include <string_view>
+#include <utility>
+#include <vector>
namespace crow
{
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index c88fc8d..967c934 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -13,22 +13,19 @@
#include "json_formatters.hpp"
#include "logging.hpp"
#include "parsing.hpp"
-#include "routing.hpp"
#include "str_utility.hpp"
#include <systemd/sd-bus-protocol.h>
#include <systemd/sd-bus.h>
#include <tinyxml2.h>
+#include <boost/beast/http/field.hpp>
#include <boost/beast/http/status.hpp>
#include <boost/beast/http/verb.hpp>
#include <boost/container/flat_map.hpp>
-#include <boost/container/vector.hpp>
#include <boost/system/error_code.hpp>
#include <nlohmann/json.hpp>
#include <sdbusplus/asio/connection.hpp>
-#include <sdbusplus/asio/property.hpp>
-#include <sdbusplus/exception.hpp>
#include <sdbusplus/message.hpp>
#include <sdbusplus/message/native_types.hpp>
@@ -38,10 +35,8 @@
#include <cstdint>
#include <cstring>
#include <filesystem>
-#include <fstream>
#include <functional>
#include <initializer_list>
-#include <iterator>
#include <limits>
#include <map>
#include <memory>
diff --git a/include/ossl_random.hpp b/include/ossl_random.hpp
index 440a2c1..a007556 100644
--- a/include/ossl_random.hpp
+++ b/include/ossl_random.hpp
@@ -2,10 +2,11 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include "logging.hpp"
-
+#include <cstddef>
+#include <cstdint>
#include <limits>
#include <string>
+#include <string_view>
namespace bmcweb
{
diff --git a/include/pam_authenticate.hpp b/include/pam_authenticate.hpp
index 7afe952..358c9d8 100644
--- a/include/pam_authenticate.hpp
+++ b/include/pam_authenticate.hpp
@@ -2,12 +2,24 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include "logging.hpp"
+
+#include <security/_pam_types.h>
#include <security/pam_appl.h>
+// misc-include-cleaner complains if this isn't included,
+// modernize-deprecated-headers complains if it is included.
+// NOLINTNEXTLINE(modernize-deprecated-headers)
+#include <string.h>
+
+#include <algorithm>
#include <cstring>
#include <memory>
+#include <optional>
#include <span>
+#include <string>
#include <string_view>
+#include <vector>
struct PasswordData
{
diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp
index 5aa5976..fb22977 100644
--- a/include/persistent_data.hpp
+++ b/include/persistent_data.hpp
@@ -3,19 +3,26 @@
#pragma once
#include "event_service_store.hpp"
-#include "http_request.hpp"
-#include "http_response.hpp"
+#include "logging.hpp"
#include "ossl_random.hpp"
#include "sessions.hpp"
+// NOLINTNEXTLINE(misc-include-cleaner)
+#include "utility.hpp"
+#include <boost/beast/core/file_base.hpp>
#include <boost/beast/core/file_posix.hpp>
#include <boost/beast/http/fields.hpp>
#include <nlohmann/json.hpp>
+#include <chrono>
+#include <cstdint>
#include <filesystem>
#include <fstream>
-#include <random>
+#include <memory>
+#include <optional>
+#include <string>
#include <system_error>
+#include <utility>
namespace persistent_data
{
diff --git a/include/security_headers.hpp b/include/security_headers.hpp
index 590b34b..7639637 100644
--- a/include/security_headers.hpp
+++ b/include/security_headers.hpp
@@ -2,11 +2,10 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include "bmcweb_config.h"
-
-#include "http_request.hpp"
#include "http_response.hpp"
+#include <boost/beast/http/field.hpp>
+
inline void addSecurityHeaders(crow::Response& res)
{
using bf = boost::beast::http::field;
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 17c2278..33d9c5b 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -2,19 +2,30 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include "bmcweb_config.h"
+
#include "logging.hpp"
#include "ossl_random.hpp"
-#include "utility.hpp"
#include "utils/ip_utils.hpp"
+// misc-include-cleaner complains if this isn't included,
+// modernize-deprecated-headers complains if it is included.
+// NOLINTNEXTLINE(modernize-deprecated-headers)
+#include <signal.h>
+
+#include <boost/asio/ip/address.hpp>
#include <nlohmann/json.hpp>
-#include <algorithm>
+#include <chrono>
#include <csignal>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
#include <memory>
#include <optional>
-#include <random>
#include <string>
+#include <string_view>
+#include <unordered_map>
#include <vector>
namespace persistent_data
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index dbc2720..daf42c4 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -3,8 +3,11 @@
#pragma once
+#include <openssl/crypto.h>
+
#include <boost/asio/ssl/context.hpp>
+#include <memory>
#include <optional>
#include <string>
diff --git a/include/str_utility.hpp b/include/str_utility.hpp
index 12e51f8..31c44b4 100644
--- a/include/str_utility.hpp
+++ b/include/str_utility.hpp
@@ -3,6 +3,7 @@
#pragma once
#include <algorithm>
+#include <cstddef>
#include <ranges>
#include <string>
#include <string_view>
diff --git a/include/user_monitor.hpp b/include/user_monitor.hpp
index 530b00f..70c4a1e 100644
--- a/include/user_monitor.hpp
+++ b/include/user_monitor.hpp
@@ -2,11 +2,13 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include "dbus_singleton.hpp"
-#include "dbus_utility.hpp"
-#include "persistent_data.hpp"
+#include "sessions.hpp"
#include <sdbusplus/bus/match.hpp>
-#include <sdbusplus/message/types.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/message/native_types.hpp>
+
+#include <string>
namespace bmcweb
{
diff --git a/include/vm_websocket.hpp b/include/vm_websocket.hpp
index e668960..addef79 100644
--- a/include/vm_websocket.hpp
+++ b/include/vm_websocket.hpp
@@ -2,24 +2,43 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include "bmcweb_config.h"
+
#include "app.hpp"
+#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
-#include "privileges.hpp"
+#include "logging.hpp"
#include "websocket.hpp"
+// NOLINTNEXTLINE(modernize-deprecated-headers)
+#include <signal.h>
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/io_context.hpp>
#include <boost/asio/local/stream_protocol.hpp>
#include <boost/asio/readable_pipe.hpp>
#include <boost/asio/writable_pipe.hpp>
-#include <boost/asio/write.hpp>
#include <boost/beast/core/buffers_to_string.hpp>
+#include <boost/beast/core/error.hpp>
#include <boost/beast/core/flat_static_buffer.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/process/v2/process.hpp>
#include <boost/process/v2/stdio.hpp>
-#include <sdbusplus/asio/property.hpp>
+#include <sdbusplus/message/native_types.hpp>
+#include <sdbusplus/unpack_properties.hpp>
+#include <cerrno>
#include <csignal>
+#include <cstddef>
+#include <filesystem>
+#include <format>
+#include <functional>
+#include <memory>
+#include <string>
#include <string_view>
+#include <system_error>
+#include <utility>
namespace crow
{
diff --git a/include/webassets.hpp b/include/webassets.hpp
index 075c995..91239dc 100644
--- a/include/webassets.hpp
+++ b/include/webassets.hpp
@@ -3,19 +3,28 @@
#pragma once
#include "app.hpp"
+#include "async_resp.hpp"
+#include "forward_unauthorized.hpp"
#include "http_request.hpp"
#include "http_response.hpp"
-#include "routing.hpp"
+#include "logging.hpp"
+#include "str_utility.hpp"
#include "webroutes.hpp"
+#include <boost/beast/http/field.hpp>
+#include <boost/beast/http/status.hpp>
#include <boost/container/flat_set.hpp>
#include <algorithm>
#include <array>
#include <filesystem>
-#include <fstream>
+#include <format>
+#include <memory>
#include <string>
#include <string_view>
+#include <system_error>
+#include <utility>
+#include <vector>
namespace crow
{
diff --git a/include/webroutes.hpp b/include/webroutes.hpp
index f3a4902..900e75a 100644
--- a/include/webroutes.hpp
+++ b/include/webroutes.hpp
@@ -3,6 +3,8 @@
#pragma once
#include <boost/container/flat_set.hpp>
+
+#include <string>
namespace crow
{
namespace webroutes