Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(agent): expose app metadata for csec via global symbol #922

Open
wants to merge 5 commits into
base: security-agent-support
Choose a base branch
from

Conversation

lavarou
Copy link
Member

@lavarou lavarou commented Jun 21, 2024

Rather than providing a PHP user function to expose app metadata to PHP userland, export a global symbol for cseg agent to use.

@lavarou lavarou requested review from ZNeumann and anmol-ap June 21, 2024 16:29
@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Jun 21, 2024

Test Suite Status Result
Multiverse 8/8 passing
SOAK 75/79 passing

@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 2.08333% with 47 lines in your changes missing coverage. Please review.

Project coverage is 77.27%. Comparing base (084453d) to head (587a75d).

Files with missing lines Patch % Lines
agent/csec_metadata.c 0.00% 44 Missing ⚠️
agent/php_minit.c 25.00% 3 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           security-agent-support     #922      +/-   ##
==========================================================
- Coverage                   77.35%   77.27%   -0.08%     
==========================================================
  Files                         199      199              
  Lines                       27757    27785      +28     
==========================================================
  Hits                        21472    21472              
- Misses                       6285     6313      +28     
Flag Coverage Δ
agent-for-php-7.2 77.40% <2.08%> (-0.09%) ⬇️
agent-for-php-7.3 77.42% <2.08%> (-0.09%) ⬇️
agent-for-php-7.4 77.13% <2.08%> (-0.09%) ⬇️
agent-for-php-8.0 76.53% <2.08%> (-0.08%) ⬇️
agent-for-php-8.1 77.03% <2.08%> (-0.09%) ⬇️
agent-for-php-8.2 76.64% <2.08%> (-0.08%) ⬇️
agent-for-php-8.3 76.64% <2.08%> (-0.08%) ⬇️
agent-for-php-8.4 76.66% <2.08%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lavarou lavarou marked this pull request as draft June 24, 2024 14:47
@lavarou lavarou marked this pull request as ready for review June 26, 2024 21:22
@lavarou lavarou force-pushed the refactor/security-agent-support branch from c912dc9 to 1a4bc74 Compare June 26, 2024 21:24
@lavarou lavarou requested review from anmol-ap and ZNeumann June 26, 2024 21:25
@anmol-ap anmol-ap self-requested a review June 27, 2024 09:46
@bduranleau-nr bduranleau-nr added the on hold This issue or pull request is necessary, but better suited for the future label Nov 4, 2024
@anmol-ap
Copy link

anmol-ap commented Jan 24, 2025

@ZNeumann @lavarou @bduranleau-nr
Could you please review the PRs now.

  • The config has been moved to a separate config file at csec agent.
  • newrelic.security.agent.enabled and newrelic.security.enabled are read in the APM agent for logging purpose.
  • Metadata required by csec agent has been exposed by api.
  • We are going ahead with separate installation approach as decided.

Related PRs :
#933
#922
#918

@anmol-ap anmol-ap force-pushed the security-agent-support branch from dce4f79 to 084453d Compare February 21, 2025 06:06
lavarou and others added 5 commits February 21, 2025 12:41
Rather than providing a PHP user function to expose app metadata to PHP
userland, export a global symbol for cseg agent to use.
Replace 'transport' struct, which would have to be versioned, with a simple
getter API of `get(key, &ptr)` signature.
This approach adds some level of protection (compiler type checking) from
misusing the API.
@anmol-ap anmol-ap force-pushed the refactor/security-agent-support branch from a5afe89 to 587a75d Compare February 21, 2025 07:13
@anmol-ap
Copy link

Rebased the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csec-agent on hold This issue or pull request is necessary, but better suited for the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants