Dependabot can now open pull requests to resolve alerts for your Gradle dependencies! If you have used the dependency submission API to upload your Gradle dependencies to the dependency graph and are receiving Dependabot alerts for those dependencies, Dependabot will now try to open a pull request to resolve them automatically if you have security updates enabled for your repository.
In addition to scanning push and pull requests, code scanning default setup now also analyzes repositories on a weekly schedule. This ensures that a scan with the most recent version of CodeQL is run regularly on your code, better protecting both active and inactive repositories. This allows users to always benefit from CodeQL engine and query improvements which are continuously released, and which could uncover new potential vulnerabilities.
When setting up code scanning, the fixed time for the weekly scan is randomly chosen. The scan will take place at the same time every week, and the schedule is displayed after the setup is completed, so you can easily see when the next scheduled analysis will occur. The scheduled analysis will be automatically disabled if a repository has seen no activity for 6 months. Opening a PR or pushing to the repo will re-enable the scheduled analysis.
This has shipped to GitHub.com and will be released with GitHub Enterprise Server 3.11.
If you are using Dependabot grouped version updates (currently in public beta), you can now group your pull requests by semantic version update level. This addition is designed to help reduce the risk of introducing a breaking change through an update.
To use this new functionality, add a new update-types
key in your group rule, as shown below:
groups:
angular:
patterns:
- "@angular*"
update-types:
- "minor"
- "patch"
The update-types
key accepts values "major," "minor," and "patch," following the SemVer structure of major.minor.patch
.
This new key works alongside existing grouping parameters such as patterns
, dependency-type
, and exclude-patterns
, allowing you to fine-tune the grouped pull requests that Dependabot creates for you!
Learn more about configuring grouped Dependabot version updates
As of August 17, 2023, Dependabot updates no longer support Python 3.6 or 3.7, which have reached their end-of-life. If your code uses these versions, Dependabot will no longer be able to open pull requests in your repository and will log errors. Update to at least Python 3.8 to ensure your code is secure and Dependabot can still run.
This change impacts Dependabot pull requests only – you will continue to receive Dependabot alerts for dependencies with known vulnerabilities. To resolve the alert, you can upgrade the affected package yourself manually.
View the official release cycle for Python for more information on supported versions.
Repository admins or members of the security manager role can now enable or disable private vulnerability reporting on respositories via REST API.
Learn more about private vulnerability reporting.
Users with secret scanning enabled on their free public repositories will now receive alerts for any potential secrets exposed in an issue’s title, description, or comments, including historical revisions. Alerts can be viewed within the UI or the REST API.
New issues are being scanned starting today and existing issues will be scanned over the coming weeks. You can expect all public repositories to be fully scanned by September 1, 2023.
- Learn how to secure your repositories with secret scanning
- Partner with GitHub on secret scanning
- Got feedback? Open a discussion in our code security community
We have released a new API for people who write custom CodeQL queries which make use of dataflow analysis. The new API offers additional flexibility, improvements that prevent common pitfalls with the old API, and improves query evaluation performance by 5%. Whether you’re writing CodeQL queries for personal interest, or are participating in the bounty programme to help us secure the world’s code: this post will help you move from the old API to the new one.
This API change is relevant only for users who write their own custom CodeQL queries. Code scanning users who use GitHub’s standard CodeQL query suites will not need to make any changes.
With the introduction of the new dataflow API, the old API will be deprecated. The old API will continue to work until December 2024; the CodeQL CLI will start emitting deprecation warnings in December 2023.
To demonstrate how to update CodeQL queries from the old to the new API, consider this example query which uses the soon-to-be-deprecated API:
class SensitiveLoggerConfiguration extends TaintTracking::Configuration {
SensitiveLoggerConfiguration() { this = "SensitiveLoggerConfiguration" } // 6: characteristic predicate with dummy string value (see below)
override predicate isSource(DataFlow::Node source) { source.asExpr() instanceof CredentialExpr }
override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "log-injection") }
override predicate isSanitizer(DataFlow::Node sanitizer) {
sanitizer.asExpr() instanceof LiveLiteral or
sanitizer.getType() instanceof PrimitiveType or
sanitizer.getType() instanceof BoxedType or
sanitizer.getType() instanceof NumberType or
sanitizer.getType() instanceof TypeType
}
override predicate isSanitizerIn(DataFlow::Node node) { this.isSource(node) }
}
import DataFlow::PathGraph
from SensitiveLoggerConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "This $@ is written to a log file.",
source.getNode(),
"potentially sensitive information"
To convert the query to the new API:
- You use a
module
instead of aclass
. A CodeQLmodule
does notextend
anything, it insteadimplements
a signature. For both data flow and taint tracking configurations this isDataFlow::ConfigSig
orDataFlow::StateConfigSig
ifFlowState
is needed. - Previously, you would choose between data flow or taint tracking by extending
DataFlow::Configuration
orTaintTracking::Configuration
. Instead, now you define your data or taint flow by instantiating either theDataFlow::Global<..>
orTaintTracking::Global<..>
parameterized modules with your implementation of the shared signature and this is where the choice between data flow and taint tracking is made. - Predicates no longer
override
anything, because you are defining a module. - The concepts of sanitizers and barriers are now unified under
isBarrier
and it applies to both taint tracking and data flow configurations. You must useisBarrier
instead ofisSanitizer
andisBarrierIn
instead ofisSanitizerIn
. - Similarly, instead of the taint tracking predicate
isAdditionalTaintStep
you useisAdditionalFlowStep
. - A characteristic predicate with a dummy string value is no longer needed.
- Do not use the generic
DataFlow::PathGraph
. Instead, thePathGraph
will be imported directly from the module you are using. For example,SensitiveLoggerFlow::PathGraph
in the updated version of the example query below. - Similar to the above, you’ll use the
PathNode
type from the resulting module and not fromDataFlow
. - Since you no longer have a configuration class, you’ll use the module directly in the
from
andwhere
clauses. Instead of using e.g.cfg.hasFlowPath
orcfg.hasFlow
from a configuration objectcfg
, you’ll useflowPath
orflow
from the module you’re working with.
Taking all of the above changes into account, here’s what the updated query looks like:
module SensitiveLoggerConfig implements DataFlow::ConfigSig { // 1: module always implements DataFlow::ConfigSig or DataFlow::StateConfigSig
predicate isSource(DataFlow::Node source) { source.asExpr() instanceof CredentialExpr } // 3: no need to specify 'override'
predicate isSink(DataFlow::Node sink) { sinkNode(sink, "log-injection") }
predicate isBarrier(DataFlow::Node sanitizer) { // 4: 'isBarrier' replaces 'isSanitizer'
sanitizer.asExpr() instanceof LiveLiteral or
sanitizer.getType() instanceof PrimitiveType or
sanitizer.getType() instanceof BoxedType or
sanitizer.getType() instanceof NumberType or
sanitizer.getType() instanceof TypeType
}
predicate isBarrierIn(DataFlow::Node node) { isSource(node) } // 4: isBarrierIn instead of isSanitizerIn
}
module SensitiveLoggerFlow = TaintTracking::Global<SensitiveLoggerConfig>; // 2: TaintTracking selected
import SensitiveLoggerFlow::PathGraph // 7: the PathGraph specific to the module you are using
from SensitiveLoggerFlow::PathNode source, SensitiveLoggerFlow::PathNode sink // 8 & 9: using the module directly
where SensitiveLoggerFlow::flowPath(source, sink) // 9: using the flowPath from the module
select sink.getNode(), source, sink, "This $@ is written to a log file.", source.getNode(),
"potentially sensitive information"
While not covered in this example, you can also implement the DataFlow::StateConfigSig
signature if flow-state is needed. You then instantiate DataFlow::GlobalWithState
or TaintTracking::GlobalWithState
with your implementation of that signature. Another change specific to flow-state is that instead of using DataFlow::FlowState
, you now define a FlowState class
as a member of the module. This is useful for using types other than string
as the state (e.g. integers, booleans). An example of this implementation can be found here.
This functionality is available with CodeQL version 2.13.0
. If you would like to get started with writing your own custom CodeQL queries, follow these instructions to get started with the CodeQL CLI and the VS Code extension.
GitHub Advanced Security customers can now perform on-demand validity checks for supported partner patterns, and the alert index view now shows if a secret is active. This builds on our release of enabling automatic validation checks for supported partner patterns back in April.
When the “Automatically verify if a secret is valid” setting is enabled on a repository, users will see a “Verify secret” button on the alert page. This sends the secret to our relevant partner provider to see if the secret is active and updates the status on the alert and index pages.
As we work with our partners to add support for more secrets, we'll update the "Validity check" column in the documented supported secrets list.
- Learn more about secret scanning
- Become a secret scanning partner
- Got feedback? Open a discussion in our code security community
If you are using the Dependabot grouped version updates feature (currently in public beta), you can now tell Dependabot to ignore updates in the group (similar to how you can do it for Dependabot's individual updates). While closing a grouped pull request will still not create ignore conditions, you can use Dependabot comment commands to tell Dependabot to ignore certain updates in the group – either a specific minor update, a specific major update, or all updates for one dependency.
On a grouped pull request, you can now also tell Dependabot to stop ignoring certain updates that you have already ignored. By commenting @dependabot unignore
, you can specify either to stop ignoring a specific range of updates, all updates for a specific dependency, or all updates for every dependency in the group. Dependabot will now also list in the pull request body all the ignore conditions it used to build the pull request. Alternatively, you can comment @dependabot show <dependency-name> ignore conditions
and Dependabot will list the ignore conditions for that dependency.
For more information on Dependabot ignore conditions and chat commands, please see the documentation.
If you are using the Dependabot grouped version updates feature (currently in public beta), you can now group your pull requests by dependency type in ecosystems that support this. Instead of listing all the dependencies by name or pattern for your groups, you can now also use the dependency-type
key (set to either "production" or "development") to create groups based on dependency type. Then, on your version updates schedule, Dependabot will try to open one pull request to update all available dependencies of that type.
For more information on how to use this feature, check out our documentation on configuring groups for Dependabot pull requests.
As an organization owner or member of the security manager role, you can now use the repository security advisories REST API to get all repository security advisories across your organization.
Learn more about repository security advisories.
Secret scanning's push protection feature prevents supported secrets from being pushed into repositories, and has to date been enabled at the repository, organization, or enterprise level.
Now, everyone across GitHub can enable push protection for themselves within your individual settings. This ensures your pushes are protected whenever you push to a public repository on GitHub, without relying on that repository to have push protection enabled.
To opt in, go to the "Code security and analysis" section of your personal settings. Next to "Push protection for yourself", click Enable.
GitHub will enable push protection for all GitHub Free individuals by default in January, 2024.
- Read the blog post
- Share feedback and questions in the Community Discussion
- Learn more about secret scanning
- Learn more about push protection for users
The code scanning REST API updated_at
field has been improved to help you review your most recently changed alerts.
The updated_at
timestamp now returns the alert's most recent state change on the branch that you requested. We consider a state change to be a significant event, including an alert being introduced, fixed, dismissed, reopened or reintroduced. This is implemented in both the repo API and org API so it can be used consistently at scale.
Previously, the updated_at
timestamp changed whenever an alert was found in an analysis or the alert state changed, and so was updated very regularly. This improvement lets you efficiently use updated_at
to sort and focus on your most recently changed alerts.
The code scanning REST API list alerts endpoints code-scanning/alerts
returns the value for the default branch, unless another branch is specificed. The alert endpoint code-scanning/alerts/{alert_number}
reports at the alert level, so will return the maximum value for the alert across all branches.
This is now live on GitHub.com for the repository level API. This will be live for the organization level API over the next few days because it requires data reindexing. This will ship to GitHub Enterprise Server version 3.11. For more information, see the code scanning REST API documentation.
You can now use the REST API to request a CVE identifier for your repository security advisories.
Learn more about repository security advisories and CVE identification numbers.
As of August 17, 2023, Dependabot will no longer support Python 3.6 or 3.7, which have reached their end-of-life. If your code uses these versions, Dependabot will no longer be able to open pull requests in your repository and will log errors. Update to at least Python 3.8 to ensure your code is secure and Dependabot can still run.
View the official release cycle for Python for more information on supported versions.