Skip to content

Conversation

@lbakerchef
Copy link
Contributor

No description provided.

@lbakerchef lbakerchef self-assigned this Aug 15, 2024
@lbakerchef lbakerchef requested review from a team as code owners August 15, 2024 02:17
@netlify
Copy link

netlify bot commented Aug 15, 2024

👷 Deploy Preview for chef-server processing.

Name Link
🔨 Latest commit c86a7cc
🔍 Latest deploy log https://app.netlify.com/projects/chef-server/deploys/6849a1c7f50a3a00083c590d

@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch 4 times, most recently from d887553 to 6f7fb13 Compare August 22, 2024 16:24
@sonarqube-for-infrastructure-prod

Quality Gate failed Quality Gate failed

Failed conditions
1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@sreepuramsudheer sreepuramsudheer force-pushed the CHEF-11677/CHEF-12498/lbaker branch from 6f7fb13 to ce45087 Compare September 11, 2024 14:07
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch from ce45087 to 1dfe2ad Compare October 7, 2024 18:20
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch from ab05d25 to f7ed692 Compare November 7, 2024 18:44
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch 16 times, most recently from d51e584 to 447a6b9 Compare November 28, 2024 02:54
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch 5 times, most recently from 2785b82 to 040e615 Compare December 5, 2024 00:05
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch 2 times, most recently from 8cdf69f to 16a408a Compare December 8, 2024 11:13
@sonarqube-for-infrastructure-prod

Quality Gate failed Quality Gate failed

Failed conditions
1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch from 4dad3d9 to 16a408a Compare December 9, 2024 15:46
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch from 16a408a to 6e12ad2 Compare December 10, 2024 15:24
# If you want to load debugging tools into the bundle exec sandbox,
# # add these additional dependencies into Gemfile.local
eval(IO.read(__FILE__ + '.local'), binding) if File.exists?(__FILE__ + '.local')
eval(IO.read(__FILE__ + '.local'), binding) if File.exist?(__FILE__ + '.local')

Check failure

Code scanning / CodeQL

Use of `Kernel.open` or `IO.read` or similar sinks with a non-constant value Critical

Call to IO.read with a non-constant value. Consider replacing it with File.read.

Copilot Autofix

AI 12 months ago

To fix the problem, we need to replace the usage of IO.read with File.read. This change will ensure that the file is read without the risk of executing arbitrary shell commands. The functionality of the code will remain the same, as File.read and IO.read both read the contents of a file.

The specific change required is in the oc-chef-pedant/Gemfile file, where we need to replace IO.read(__FILE__ + '.local') with File.read(__FILE__ + '.local').

Suggested changeset 1
oc-chef-pedant/Gemfile

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/oc-chef-pedant/Gemfile b/oc-chef-pedant/Gemfile
--- a/oc-chef-pedant/Gemfile
+++ b/oc-chef-pedant/Gemfile
@@ -19,3 +19,3 @@
 # # add these additional dependencies into Gemfile.local
-eval(IO.read(__FILE__ + '.local'), binding) if File.exist?(__FILE__ + '.local')
+eval(File.read(__FILE__ + '.local'), binding) if File.exist?(__FILE__ + '.local')
 
EOF
@@ -19,3 +19,3 @@
# # add these additional dependencies into Gemfile.local
eval(IO.read(__FILE__ + '.local'), binding) if File.exist?(__FILE__ + '.local')
eval(File.read(__FILE__ + '.local'), binding) if File.exist?(__FILE__ + '.local')

Copilot is powered by AI and may make mistakes. Always verify output.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2025

lbakerchef and others added 8 commits June 11, 2025 10:13
Update to Erlang 26.2.5.2

Update plan.sh files to erlang26

Upgrade rebar3

Recompile Elvis and fix elvis complaints

Remove eper

    It's old and unmaintained, and now it won't compile without warnings.
    the last commit was 6-10 years ago.

    Most of the tools within it now have more updated equivalents
    elsewhere.

    Choices:

    1) just remove it
    2) fork it, fix compile errors, maintain it
    3) remove it, then when and where needed, use updated equivalents.

    For now, going with #1.

Fix compilation errors in depsolver

Fix undefined type error and syntax error.

Fix dialyzer errors

pg2 -> pg
    pg2 was removed by Erlang.

start -> ensure_started

Add {minor_version, 1} option to term_to_binary pursuant to Erlang 26 update.

    term_to_binary changed.  This option is now needed in order to maintain
    current behavior and avoid failures.

Add [{minor_version, 1}] option to all term_to_binary function calls

    It's probably not good to have some calls using this option and other
    calls not using it.

Fix /_stats API pedant test failure following update to erlang 26x

  2) /_stats API endpoint returns prometheus output ?format=text
     Failure/Error: expect(names.uniq).to match_array(PROMETHEUS_RESPONSE_TYPE_MAP.keys)

       expected collection contained:  ["chef_index_batch_completed_latency_ms_bucket", "chef_index_batch_completed_latency_ms_count", "chef... "pg_stat_tidx_blks_read", "pg_stat_toast_blks_hit", "pg_stat_toast_blks_read", "pg_stat_tup_fetch"]
       actual collection contained:    ["chef_index_batch_completed_latency_ms_bucket", "chef_index_batch_completed_latency_ms_count", "chef... "pg_stat_tidx_blks_read", "pg_stat_toast_blks_hit", "pg_stat_toast_blks_read", "pg_stat_tup_fetch"]
       the missing elements were:      ["erlang_mnesia_committed_transactions", "erlang_mnesia_failed_transactions", "erlang_mnesia_held_loc...d_transactions", "erlang_mnesia_transaction_coordinators", "erlang_mnesia_transaction_participants"]
     # ./spec/api/stats_spec.rb:218:in `block (2 levels) in <top (required)>'

Add ssl option verify_none following update to Erlang 26.

    Erlang changed this from a default option to an option which now has to
    be specified.  Not specifying it was causing failures in SSL when using
    a self-signed cert (see below).

    1) Server-side reindexing reindexing OPC it should behave like Reindexing works for all object types
       Failure/Error: identifiers.should_not include(name)
         expected ["pedant_node_test"] not to include "pedant_node_test"
       Shared Example Group: "Reindexing" called from ./spec/api/reindex_spec.rb:20
       # ./lib/pedant/rspec/search_util.rb:932:in `block in do_search'
       # ./lib/pedant/rspec/search_util.rb:769:in `with_search_polling'
       # ./lib/pedant/rspec/search_util.rb:919:in `do_search'
       # ./lib/pedant/rspec/search_util.rb:888:in `should_not_find'
       # ./lib/pedant/rspec/search_util.rb:950:in `block (2 levels) in <module:RSpec>'

Signed-off-by: Lincoln Baker <[email protected]>
testing with LTS-2024

adding studio secretes

Signed-off-by: RoyShravani <[email protected]>
Signed-off-by: Lincoln Baker <[email protected]>
Signed-off-by: sreepuramsudheer <[email protected]>
@lbakerchef lbakerchef force-pushed the CHEF-11677/CHEF-12498/lbaker branch from 923f57d to c86a7cc Compare June 11, 2025 15:33
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants