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

[in-proc backport] Replace build-extension.ps1 with SiteExtension.csproj #10649

Open
wants to merge 13 commits into
base: in-proc
Choose a base branch
from

Conversation

jviau
Copy link
Contributor

@jviau jviau commented Nov 21, 2024

Issue describing the changes in this PR

This is the in-proc backport for #10168

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR
  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Replaces build-extension.ps1 with an msbuild project to build our site extension for net6.0 and net8.0 simultaneously.

Copy link
Contributor

Dependency Review

The following issues were found:
  • ❌ 1 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
See the Details below.

Vulnerabilities

src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj

NameVersionVulnerabilitySeverity
Azure.Identity1.11.2Azure Identity Libraries and Microsoft Authentication Library Elevation of Privilege Vulnerabilitymoderate

OpenSSF Scorecard

PackageVersionScoreDetails
nuget/Azure.Identity 1.11.2 🟢 7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 4branch protection is not maximal on development and all release branches
Vulnerabilities🟢 82 existing vulnerabilities detected
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
nuget/Azure.Security.KeyVault.Secrets 4.2.0 🟢 7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 4branch protection is not maximal on development and all release branches
Vulnerabilities🟢 82 existing vulnerabilities detected
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
nuget/Microsoft.Azure.WebJobs 3.0.41-11331 🟢 7.5
Details
CheckScoreReason
Dangerous-Workflow⚠️ -1no workflows found
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 10all changesets reviewed
Maintained🟢 1011 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions⚠️ -1No tokens found
Security-Policy🟢 10security policy file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities🟢 100 existing vulnerabilities detected
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ -1no dependencies found
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during GetBranch(storage-3.x): error during branchesHandler.query: internal error: githubv4.Query: Resource not accessible by integration
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
nuget/Microsoft.Azure.WebJobs.Extensions 5.0.0-beta.2-10879 🟢 5.7
Details
CheckScoreReason
Token-Permissions⚠️ -1No tokens found
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow⚠️ -1no workflows found
Maintained🟢 57 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Security-Policy🟢 10security policy file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 8Found 26/30 approved changesets -- score normalized to 8
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ -1no dependencies found
Binary-Artifacts🟢 10no binaries found in the repo
Vulnerabilities🟢 100 existing vulnerabilities detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
nuget/Microsoft.Azure.WebJobs.Host.Storage 5.0.0-beta.2-11957 🟢 7.5
Details
CheckScoreReason
Dangerous-Workflow⚠️ -1no workflows found
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 10all changesets reviewed
Maintained🟢 1011 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions⚠️ -1No tokens found
Security-Policy🟢 10security policy file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities🟢 100 existing vulnerabilities detected
License🟢 10license file detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ -1no dependencies found
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during GetBranch(storage-3.x): error during branchesHandler.query: internal error: githubv4.Query: Resource not accessible by integration
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
nuget/Microsoft.Extensions.Azure 1.7.0 🟢 7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Maintained🟢 1030 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 4branch protection is not maximal on development and all release branches
Vulnerabilities🟢 82 existing vulnerabilities detected
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
nuget/Microsoft.Azure.EventHubs 2.1.0 UnknownUnknown

Scanned Files

  • src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj
  • src/WebJobs.Script/WebJobs.Script.csproj
  • test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj

@@ -499,6 +499,4 @@ local.settings.json
/tools/ExtensionsMetadataGenerator/test/ExtensionsMetadataGeneratorTests/runtimeAssemblies.txt

local.settings.json
msbuild.binlog
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are already in gitignore

@jviau
Copy link
Contributor Author

jviau commented Dec 2, 2024

Current blocker for this PR:

Part of this change was to leverage msbuild project dependencies to build in parallel and avoid double-building when we publish the separate net6 and net8 site extensions. A result of this is changing how the version property resolves: using TFM instead of a supplied parameter. This has led to an issue: WebJobs.Script is not multi-targeted like our other assemblies, meaning it is 4.37.0 when others are 4.{6|8}37.0. And this has real impact as we use WebJobs.Script's assembly version as the reported version everywhere, meaning we will report 4.37.0 with this change.

Fix options:

  1. Multi-target WebJobs.Script to net6/net8
    • I think we should do this eventually as my testing shows it brings in extra analyzers, which are catching potentially real issues with that assembly.
  2. Explicitly build each TFM and use old versioning logic.

I will go with option 2 for now, then follow up on option 1 in another PR.

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.

2 participants